11-18-2022, 09:52 PM
This worked for me. I made a copy of an instagram icon and changed the name. I compared the original to the one with the changed name to see if the name change would affect the results. It did not. This is a very fast method, but sure, you'd have to look into any particulars that it might not be reliable.
For now, if you are curious, here is how it's done.
Pete
For now, if you are curious, here is how it's done.
Code: (Select All)
IF _FILEEXISTS("instagram_icon.jpg") THEN
OPEN "instagram_icon.jpg" FOR BINARY AS #1
a$ = SPACE$(LOF(1))
GET #1, , a$
CLOSE #1
PRINT LEN(a$)
END IF
IF _FILEEXISTS("junk-for-qb64-test.jpg") THEN ' This is a renamed copy of the instigram icon.
OPEN "junk-for-qb64-test.jpg" FOR BINARY AS #1
b$ = SPACE$(LOF(1))
GET #1, , b$
CLOSE #1
PRINT LEN(b$)
END IF
IF LEN(a$) AND LEN(b$) THEN
IF a$ = b$ THEN PRINT "Same Image" ELSE PRINT "Different Image"
ELSE
PRINT "An image couldn't be found."
END IF
Pete
If eggs are brain food, Biden takes his scrambled.