I am using the following function to convert image to hash: Public Function MD5Hash(ByVal sFile As String) As String
When I use this:
^^ it works just fine.
But when I try something like this:
^^ IT does not work... because it cannot be converted to string?
I have also tried picturebox1.image.tostring. Also does not work.
How do I fix this?
:confused::confused:
When I use this:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim picture As String = ("C:\Users\Public\Pictures\Sample Pictures\Desert.jpg")
Dim hsh As String = MD5FileHash(picture)
TextBox1.Text = hsh
End Sub
But when I try something like this:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim openfile As New OpenFileDialog
If openfile.ShowDialog = Windows.Forms.DialogResult.OK Then
PictureBox1.Image = Image.FromFile(openfile.FileName)
End If
Dim hsh As String = MD5FileHash(picturebox1.image)
TextBox1.Text = hsh
End Sub
I have also tried picturebox1.image.tostring. Also does not work.
How do I fix this?
:confused::confused: