Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to compare 2 JPG files in code?
Message
 
À
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:
01470988
Vues:
71
By the way, I've found through experience that just comparing the file size of 2 images is sufficient 99.999% of the time which is good enough for me and is an EXTREMELY light way of doing this. Disclaimer: In my implementation I'm just trying to determine if a new image being added is already there (maybe 20 images max attached to this item). If I was trying to determine if a file already existed in a list of thousands of images, then this method probably wouldn't work as well.
** Get File Size of the Image
lcCompatible=SET("Compatible")
SET COMPATIBLE ON
TRY
  lnFileSize=FSIZE(lcImageFilenameWithPath)
CATCH
  lnFileSize=0
ENDTRY
SET COMPATIBLE &lcCompatible
Brandon Harker
Sebae Data Solutions
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform