Thumbnail problem

Started by portofino, February 12, 2024, 10:55:22 AM

Previous topic - Next topic

portofino

My project was to camouflage a few jpgs into being recognized as shot from a specific smatphone.
So i did like this:

-Stripped all metadata from the jpgs with:
exiftool -All= -Adobe:All= xyz.jpg
(stripping adobe stuff had no negative consequences in my case luckily)

-Shot a few random photos with the smartphone

-Copied the exif from the photos i just shot onto my now exif-free jpgs using:
exiftool -TagsFromFile abc.jpg -EXIF xyz.jpg
(one by one)

Everything seemed perfect until I transfered my camouflaged jpgs from my pc onto the smartphone and noticed that all those jpgs now carry the thumbnails of the random photos i used to camouflage them.

This is not good for me, i also need them to have the original thumbnail. How can i fix it?

StarGeek

Quote from: portofino on February 12, 2024, 10:55:22 AM-Copied the exif from the photos i just shot onto my now exif-free jpgs using:
exiftool -TagsFromFile abc.jpg -EXIF xyz.jpg
(one by one)

This command copies the EXIF data as a block, so it will be exactly the same data, including the thumbnail, as the source image.

Instead, copy the tags individually with
-TagsFromFile abc.jpg -EXIF:All xyz.jpg

QuoteEverything seemed perfect until I transfered my camouflaged jpgs from my pc onto the smartphone and noticed that all those jpgs now carry the thumbnails of the random photos i used to camouflage them.

Adding --ThumbnailImage will exclude the ThumbnailImage from being copied. See the --TAG option.
-TagsFromFile abc.jpg -EXIF:All --ThumbnailImage
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

portofino

so first of all ty for your help
Let me go in detail, hope i make my self undesrtandable :)

Starting from my exif+adobe stripped jpgs (exif receiver) and my native camera photos (exif donor)
I did as you suggested:
-TagsFromFile donor.jpg -EXIF:All --ThumbnailImage receiver.jpg

I then read both donor.jpg and receiver.jpg with exiftool side by side and i notice that they look quite different, many entries are missing in receiver including thumbnail data, this is of course because receiver was stripped from everything before being injected.
So as they are right now, receiver.jpg dont pass the camouflage test after being injected.

On the other hand when i injected receiver with "exiftool -TagsFromFile donor.jpg -EXIF receiver.jpg"
Everything looked the same doing a scan of both side by side. But of course the issue turned out to be the unwanted presence of donor thumbnail. So these also dont pass the camouflage test.

I also tried exiftool -TagsFromFile donor.jpg -EXIF --ThumbnailImage receiver.jpg but that didn't work LOL, the thumbnail still carried over.

So in conclusion adding :All to EXIF makes the receiver.jpg look less identical.
What would my solution be? What if i do my injections using "exiftool -TagsFromFile donor.jpg -EXIF receiver.jpg" and then work on the thumbnail? what if delete the thumbnail? will my pc just generate a new one?
hope you understand me, ty again :D

StarGeek

Quote from: portofino on February 12, 2024, 01:07:47 PMSo in conclusion adding :All to EXIF makes the receiver.jpg look less identical.

Less identical in what way?  I suspect that this might be FAQ #13a.  Any edit by exiftool is going to rearrange some things, but the data should still be there.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

portofino

yeah quite a few entries are missing from receiver compared to donor when i copy using :All.
If i copy without :All both files look the same.
(I'm also using Exifpilot alongside exif tool to read the data)
What would be the best way to inject the thumbnail of "exif-stripped receiver.jpg"
onto receiver.jpg that has already received exif from donor using the command that excludes ":All"
(exiftool -TagsFromFile donor.jpg -EXIF receiver.jpg)

Phil Harvey

#5
You could do this in 3 steps:

1. exiftool -thumbnailimage -b target.jpg > thumb.jpg

2. exiftool -tagsfromfile source.jpg -exif target.jpg

3. exiftool "-thumbnailimage<=thumb.jpg" target.jpg

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

portofino

hi Phil
step 3 correct command is this one, right?

exiftool "-thumbnailimage<=thumb.jpg" image.jpg

cause yours gives me error

Phil Harvey

Right, thanks.  I'll fix my post to add the missing "=".

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

portofino

exiftool -thumbnailimage -b target.jpg > thumb.jpg
is extracting some thumbnails in 256x192 pixels while others in 512x384 (x2)
Any way to force generated thumb to always be 512x384? As original unedited camera photo has 512x384 in thumbnail exif

StarGeek

There may be multiple thumbs in the file.  Try the command in this example to extract all embedded thumbs.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype