ExifTool Forum

General => Metadata => Topic started by: 11august on May 19, 2025, 09:18:27 AM

Title: Improving IA image detection
Post by: 11august on May 19, 2025, 09:18:27 AM
Hello all,

With our analysis software team, we are in the process to gather clues on metadata changes between original image vs IA image + metadata artificially added, for example with

exiftool -TagsFromFile "image2.jpg" -all:all -overwrite_original_in_place "image1.jpg"

What I've found so far is :

- The tags "Interoperability Index" and "Interoperability Version" which are both deleted by the process
- The tag "Y Cb Cr Subsampling" is modified
- The tag "encoding process" is modified from "Baseline DCT, Huffman coding" to "Progressive DCT, Huffman coding".

I know that both Interoperability tags are writable and that the save of the file can be done easily on Baseline DCT, but is the YCbCr Subsampling tag can also be overwrite ?

Also, how to overwrite all these tags with ExifTool ?

Thanks !
Title: Re: Improving IA image detection
Post by: StarGeek on May 19, 2025, 10:56:56 AM
Quote from: 11august on May 19, 2025, 09:18:27 AM- The tags "Interoperability Index" and "Interoperability Version" which are both deleted by the process

See the EXIF Tags page (https://exiftool.org/TagNames/EXIF.html). Both of these are marked as "unsafe" for copying. To copy them, you must explicitly do so. So what you are seeing is the original values in the target image. Using -All:All will not copy unsafe tags, you would have to use
-TagsFromFile source.jpg -All:All -InteropVersion -InteropIndex

Quote- The tag "Y Cb Cr Subsampling" is modified

Use the command in FAQ #3 (https://exiftool.org/faq.html#Q3) to see which YCbCrSubSampling tag you are looking at. The File:YCbCrSubSampling tag in a JPEG cannot be altered by exiftool or any other program without re-encoding the file. It is a property of the file, the same way that the image height or width is.

The EXIF:YCbCrSubSampling and XMP-tiff:YCbCrSubSampling can be written by exiftool, and depending upon the command, might end up being copied from the File:YCbCrSubSampling and unless you use the -a (-duplicates) option (https://exiftool.org/exiftool_pod.html#a---a--duplicates---duplicates), you may not notice that there are two tags with different values.

Quote- The tag "encoding process" is modified from "Baseline DCT, Huffman coding" to "Progressive DCT, Huffman coding".

This is another property of the file and cannot be changed without re-encoding the file. It cannot be copied and unlike the YCbCrSubSampling tag, there isn't another tag with the same name.

I strongly suggest that you use the FAQ #3 command, otherwise you won't be viewing all the data in the file. You should also look up the tags on the Tags Names pages (https://exiftool.org/TagNames/) to get a better idea which tags can be edited. I use the Tag Names PDF (https://exiftool.org/TagNames.pdf) to do a quick search for a tag, as it lists all the tags in a single document rather than split between multiple pages.
Title: Re: Improving IA image detection
Post by: Phil Harvey on May 19, 2025, 05:50:07 PM
Quote from: StarGeek on May 19, 2025, 10:56:56 AMUsing -All:All will not copy unsafe tags, you would have to use
-TagsFromFile source.jpg -All:All -InteropVersion -InteropIndex

Quote- The tag "Y Cb Cr Subsampling" is modified

The Unsafe shortcut covers these tags (see the Shortcuts tags (https://exiftool.org/TagNames/Shortcuts.html)).  So I would suggest this:

    -TagsFromFile source.jpg -All:All -unsafe

- Phil
Title: Re: Improving IA image detection
Post by: StarGeek on May 20, 2025, 10:16:41 AM
Quote from: Phil Harvey on May 19, 2025, 05:50:07 PMThe Unsafe shortcut covers these tags (see the Shortcuts tags (https://exiftool.org/TagNames/Shortcuts.html)).

And there's another tag that I've used in the past and totally forgot about. Though to be honest, they are tags I really care about.
Title: Re: Improving IA image detection
Post by: 11august on May 20, 2025, 12:31:20 PM
Many thanks StarGeek and Phil for your help and the input that perfectly make sense, much appreciated.

Will continue to test IA images now with modified metadata :)