Author Topic: thumbnail modification : is it possible?  (Read 3330 times)

dedef

  • Jr. Member
  • **
  • Posts: 12
thumbnail modification : is it possible?
« on: January 26, 2014, 05:37:21 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17510
    • ExifTool Home Page
Re: thumbnail modification : is it possible?
« Reply #1 on: January 26, 2014, 07:31:38 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dedef

  • Jr. Member
  • **
  • Posts: 12
Re: thumbnail modification : is it possible?
« Reply #2 on: January 27, 2014, 02:26:54 AM »
 :D :D Thank you

dedef

  • Jr. Member
  • **
  • Posts: 12
Re: thumbnail modification : is it possible?
« Reply #3 on: January 27, 2014, 08:35:00 AM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17510
    • ExifTool Home Page
Re: thumbnail modification : is it possible?
« Reply #4 on: January 27, 2014, 08:40:38 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dedef

  • Jr. Member
  • **
  • Posts: 12
Re: thumbnail modification : is it possible?
« Reply #5 on: January 27, 2014, 12:04:18 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17510
    • ExifTool Home Page
Re: thumbnail modification : is it possible?
« Reply #6 on: January 27, 2014, 02:07:04 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dedef

  • Jr. Member
  • **
  • Posts: 12
Re: thumbnail modification : is it possible?
« Reply #7 on: January 27, 2014, 02:54:21 PM »
Ok, I understand better.

I have to change the thumbnail for un puzzle.

Thank you very much for your help.

dedef

  • Jr. Member
  • **
  • Posts: 12
Re: thumbnail modification : is it possible?
« Reply #8 on: January 27, 2014, 04:09:51 PM »
One question more : for the same result, is it possible to use le stand-alone version exiftool(???? ... ????).exe, rather than command lines?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17510
    • ExifTool Home Page
Re: thumbnail modification : is it possible?
« Reply #9 on: January 27, 2014, 07:24:27 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dedef

  • Jr. Member
  • **
  • Posts: 12
Re: thumbnail modification : is it possible?
« Reply #10 on: January 28, 2014, 03:05:46 AM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17510
    • ExifTool Home Page
Re: thumbnail modification : is it possible?
« Reply #11 on: January 28, 2014, 07:15:18 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).