ExifTool Forum

ExifTool => Developers => Topic started by: herb on July 21, 2019, 09:00:20 AM

Title: Export embedded thumbnail and ...
Post by: herb on July 21, 2019, 09:00:20 AM
... get the imagesize with only 1 call to exiftool.

Hello Phil,

I want to export an embedded image (e.g. thumbnailimage) and I also want the imagesize of the image itself.
To do one after the other is no problem and also doing it with one call to Exiftool using -execute option works perfect.

My question is: Is it also possible with one call so that Exiftool does read the image only once.

Thanks for your help in advance
Best regards
Herb
Title: Re: Export embedded thumbnail and ...
Post by: Phil Harvey on July 22, 2019, 07:18:03 AM
Hi Herb,

There are various ways to do this.  For example, in JSON format:

exiftool -j -b -thumbnailimage -imagesize FILE

But if you want it in binary format, there is only one way I can think of -- using the -W option:

exiftool -W tmp/%f_%t.%s -b -thumbnailimage -imagesize FILE

- Phil

Edit:  Oops.  Forgot -b in the second command.  Fixed.
Title: Re: Export embedded thumbnail and ...
Post by: herb on July 22, 2019, 08:37:33 AM
Hello Phil,

thanks for your help.
The idea using %t and also %s might be useful. I will continue.

Best regards
Herb