Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to compare 2 JPG files in code?
Message
De
29/06/2010 13:24:23
 
 
À
29/06/2010 12:26:53
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01470953
Message ID:
01470981
Vues:
44
>>I would suggest that editing the image and saving it (without actually making changes) is actually altering the compression level of the jpg So, in fact, the image has changed.
>>
>>If it's not actually changing the compression level, then I would guess the jpg header is being modified. Compare the files with a hex editor and then, if that is the case, strip out the header string prior to comparison.
>>
>>In the end, it sounds like you want more of a soundex() for images? Can't help there. Sorry.
>
>Thanks for the feedback. A soundex() for images would be nice!

I suspect Brandon is right, Paint is probably changing the compression level to what it thinks is "correct".

What you might be able to do is determine the compression level before anyone does any editing, then when it's saved again, make sure the same compression level is used. While I can't offer any specifics one place you could start looking is in the GDIPlusX library: http://www.codeplex.com/wikipage?ProjectName=VFPX&title=GDIPlusX . There are some people on this forum knowledgeable with this library who can probably help.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform