Don't even think about it.
"Similarities" in an image are complicated enough: a shade off, a slight change in size or alignment, a small rotation - these are difficult enough for a computer to spot in an actual picture:
image similarity python - Google Search[
^]
But converted to text? once you do that, you have no real idea even what
shape the image was, much less what format the data might have been (and a JPG file content will be very different from a Bitmap or PNG file!).
Follow a few of those links, and use the packages to compare actual images, not a text "representation".