-1

I want to be able to identify that Image x and Image y are the same. Assume someone who wants to mess with the metadata does not know the existence of the ICC profile section - how do i arbitrarily set ICC profiles values so that I can use that to verify if 2 images are the same?

If you could point me to further resources that would also be helpful.

enter image description here

  • 1
    "Assume someone who wants to mess with the metadata does not know the existence of the ICC profile section..." Why make this assumption? Are you relying on this assumption to make a proposed scheme work, or is this more of a constraint for the purposes of discussion / argument? – scottbb Jun 8 '17 at 19:30
  • @scottbb Hey Scott, ive mentioned that detail because its needed for my proposed scheme to work. – kalin Jun 9 '17 at 7:50
2

Don't do this, make your own extended section instead. Messing with the ICC profile may (likely will) cause display issues as it is the information that gives the context of the data contained within the file and how it should be interpreted for proper display.

This question on Stack Overflow goes into the technical details of how you can do this, but you can simply make an EXIF tag ID that doesn't match up with a normal expected value and most viewers won't recognize it.

As a complete alternative approach you could also utilize image watermarking using something like steganography to embed something detectable but invisible within the image itself. Image manipulation might cause this to drop, but if the user reworks the image, chances are decent they'll drop and recreate EXIF data too.

| improve this answer | |
  • Hi AJ, will modifying just the ProfileDateTime field pose any issues? If i wanted to experiment with modifying the ICC profiles of image, how would you recommend I go about this? – kalin Jun 15 '17 at 10:50
  • I think his point is hiding pebbles on a beach here. Which is called "security by obscurity" by detractors and "steganography" by advocates. – rackandboneman Aug 31 '18 at 16:21
  • @rackandboneman steganography is more than just security by obscurity. Usually it is encoded in such a way that without the key, the information can't be decoded from the image. All cryptography is essentially "security by obscurity" on some level, in that if you have the obscure key then the data is easily available, but that isn't the traditional meaning of the phrase. – AJ Henderson Aug 31 '18 at 16:29
1

Any EXIF tag you set (including custom ones) can be altered by anyone who wants to. It's completely insecure and unreliable.

Typically in IT if you want to ensure the secure of a file (that it's not a tampered version), you'd use a file checksum, as explained briefly here. Essentially you create a separate file which lists computed values that have a high probability of being unique for each file. If you need to compare a file to your existing version, you can compute the checksum for the new file and see if it matches your existing values.

But that won't be useful to compare files which are e.g. resized. For that you need dedicated image processing tools and some clever thinking.

Using Imagemagick's compare functionality is probably the most easily available approach and you can get as complex or simple as you like with it.

If you scroll down that page you'll see quite a lot of info about various strategies and methods for comparing two images.

| improve this answer | |
  • Using checksums/hashes is very unreliable for compare images. ANY change (even a one bit) in image or metadata will change the hash and therefore will define images as different! – Romeo Ninov Aug 31 '18 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.