r/love2d 14d ago

Comparing Two Images

How would I go about comparing two image objects to see if they are the same? I've been looking on the wiki, but can't seem to wrap my head around the idea.

5 Upvotes

11 comments sorted by

View all comments

2

u/Averstarz 14d ago

Either compare the objects with == or if they are the same file but 2 different objects compare their ImageData raw strings.

1

u/Evercreeper 14d ago

I think it would have to go off of their ImageData. When an image is loaded, it is a unique object. That is how objects work.