I have a question about the md5 hash from an image. I have already written an android app which generates the md5 hash from every image it takes and saves the image under this filename. When I compare the string with a program on my Windows PC it is exact the same string. Even online generators generate the same string. So I think everything works fine on Android. Now it comes to iOS... I don't know what and how, but iOS7 changes every Image it gets. (I think). For example: If I make a photo, generate the hash from this picture and save it on my Android or Desktop it has an other hash then it had on the iPhone. I even tried to save one of my images through safari on my iPhone and then sendet it back to my desktop. Tada, I got another hash then before. Even the size of the picture is different (about 300b).
Can someone tell me what Apple is doing here and how to avoid this? How can I compare images downloaded from a server on an android and iOS device if the hash will never be the same?
I'm using the hash to compare if the picture was correctly downloaded from my server, but under this circumstances it doesn't work under iOS.
I have read a similar article here: IOS UIImage data differ with android image (for image downloaded from google) But there was no direct answer to this. I believe that the md5 Method from iOS works correct, but I think iOS does "things" with images so that the md5 is always different.
Thank you.
0 comments:
Post a Comment