thumbnail modification : is it possible?

Started by dedef, January 26, 2014, 05:37:21 PM

Previous topic - Next topic

dedef

Hello,

With ThumbnailImage command, it is possible to extract the thumbnail of a picture.
I would like to know if it is possible to modify le thumbnail of a picture?

Thanks

Phil Harvey

To extract the thumbnail to a file:

exiftool -thumbnailimage -b image.jpg > thumb.jpg

And to write one back to the image:

exiftool -thumbnailimage=thumb.jpg image.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 ($).


dedef

It does'n't work :

"C:\Program Files (x86)\Exiftool\exiftool.exe" -thumbnailImage -b "D:\a\nocibur.jpg" > "D:\a\th_original.jpg":) OK

"C:\Program Files (x86)\Exiftool\exiftool.exe" -thumbnailImage<="D:\a\th_to_inject.jpg " "D:\a\nocibur.jpg " :   :-[ I get the message  Thumbnail Image :  <Binary data 7944 bytes, use –b option to extract (7944 bytes is the size of th_original)

"C:\Program Files (x86)\Exiftool\exiftool.exe" -thumbnailImage -b "D:\a\nocibur.jpg" > "D:\a\th_after_modification.jpg" : th_after_modification is the same as th_original!

Perhaps th_to_inject is too large : 29kB?


Phil Harvey

You need to quote the entire argument.  The "<" symbol is special, and needs to be inside the quotes in your second command.

Right.  I see that my original command was wrong (I forgot the "<").  It should have been:

exiftool "-thumbnailimage<=thumb.jpg" image.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 ($).

dedef

Thank you, now it works: the embedded thumbnail corresponds to the modified thumbnail  :D  :D  :D  :D!

But I am a little surprised  :-\  :-\ : when I'm in the browser (Chrome) and I choose the display option with  thumbnail (small, wide or very wide), the thumbnail I see does not match the embedded thumbnail! I thought the embedded thumbnails used for display in the browser.

It's the same with ExifToolGui : The display corresponds to the picture, not to the thumbnail.

What use the embedded thumbnail?

Am I wrong  :-\?

Phil Harvey

I don't know what software uses the embedded thumbnails.  As computers get faster and faster, the embedded thumbnails become less and less useful.

- 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 ($).

dedef

Ok, I understand better.

I have to change the thumbnail for un puzzle.

Thank you very much for your help.

dedef

One question more : for the same result, is it possible to use le stand-alone version exiftool(???? ... ????).exe, rather than command lines?

Phil Harvey

If you mean using ExifToolGUI instead of the command-line exiftool, then I can't answer this.  I don't know if it can be used to embed thumbnails.

- 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 ($).

dedef

I mean this version :

ii) Stand-alone version in the Windows GUI:

Double-click on "exiftool(-k).exe" to read the application documentation, or drag-and-drop files and folders to run exiftool on the selected files.

Simple options may be added inside brackets in the name of the stand-alone executable. (But note that the characters /\?*:|"<> may not be used because they are invalid in Windows file names.) In this way, the behaviour of the drag-and-drop application can be customized.

Phil Harvey

The stand-alone version you are describing is the command-line application.

- 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 ($).