Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to compare 2 JPG files in code?
Message
 
To
29/06/2010 12:26:53
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01470953
Message ID:
01470988
Views:
70
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
Previous
Reply
Map
View

Click here to load this message in the networking platform