Hello all!
Once again I'm here to ask a dumb and simple question that is really bugging me.
I have this code to download the image, take its hash and save it. If I hash the image while it's in the memorystream it matches 100% to the image if I manually downloaded it.
Now once I save the image and hash that, it gives me something else, even though the image looks the same.
Here is the code:
Now I'm no expert in imaging but I know that .jpg is not the same as .jpeg. Could this issue be that I'm telling its ImageFormat.jpeg? Or is it something else?
Thanks !
Once again I'm here to ask a dumb and simple question that is really bugging me.
I have this code to download the image, take its hash and save it. If I hash the image while it's in the memorystream it matches 100% to the image if I manually downloaded it.
Now once I save the image and hash that, it gives me something else, even though the image looks the same.
Here is the code:
vb.net Code:
Dim tClient As WebClient = New WebClient Dim captcha As MemoryStream = New MemoryStream(tClient.DownloadData(myUrlToCaptcha)) 'This will give me an exact hash of the image Label2.Text = "Hash: " + GetMD5(captcha) 'This is the problem I think. The Original image is .jpg Dim returnImage As Image = Image.FromStream(captcha) returnImage.Save("C:\aa.jpg", ImageFormat.Jpeg) 'If I hash the new image, it will give me something else
Now I'm no expert in imaging but I know that .jpg is not the same as .jpeg. Could this issue be that I'm telling its ImageFormat.jpeg? Or is it something else?
Thanks !