ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: Beholder3 on June 19, 2012, 07:21:25 AM

Title: FReq: Extracting all previews in one go / comparing metadata directly
Post by: Beholder3 on June 19, 2012, 07:21:25 AM
Hello,

surprisingly I do propose two feature requests for exiftool:
All currently can be achieved as has been discussed, but it involves some user interaction and shell commands to do so. Since I like automation these sound like valid feature requests.  :)
Title: Re: FReq: Extracting all previews in one go / comparing metadata directly
Post by: Phil Harvey on June 19, 2012, 07:52:58 AM
Request 1 is interesting, and would be a whole new functionality, but may be a bit beyond the scope of the exiftool application.

Request 2 would require extracting multiple binary values to different files.  I have toyed with this idea:

exiftool "-thumbnailimage>=%f_thumb.jpg" "-previewimage>=%f_preview.jpg" "-jpgfromraw>=%f_jfr.jpg" -b FILE

Which is the inverse of the "<=" syntax.  Would this do what you want?

I seem to recall a stumbling block that prevented me from implementing this, but I can't remember the details right now.

- Phil
Title: Re: FReq: Extracting all previews in one go / comparing metadata directly
Post by: Beholder3 on June 19, 2012, 12:01:18 PM
I just ran
"-thumbnailimage>=%f_thumb.jpg" "-previewimage>=%f_preview.jpg" "-jpgfromraw>=%f_jfr.jpg" -b
in exiftoolGUI on a DNG file and it did nothing helpful. The output was
QuoteWarning: Tag 'thumbnailimage>' does not exist
Warning: Tag 'previewimage>' does not exist
Warning: Tag 'jpgfromraw>' does not exist
Nothing to do.
<-END-

Any other ideas?
Title: Re: FReq: Extracting all previews in one go / comparing metadata directly
Post by: Phil Harvey on June 19, 2012, 12:11:40 PM
Sorry if I confused you.  The example command I gave is how this feature could work in theory if you thought it would be useful, but this feature doesn't exist yet (as of version 8.95).

- Phil
Title: Re: FReq: Extracting all previews in one go / comparing metadata directly
Post by: Beholder3 on June 19, 2012, 12:16:56 PM
Ah, ok, I thought this could be a kind of long workaround command.

I am not so sure it would actually work well on DNGs. If I interpret exiftools output correctly there are two items stored under the "title" "previewimage" in the DNG. The smaller 640 x 480 pixel one and the full size.
I guess you would need to add one fourth item for the "BigImage" content as well to grab the fullsize preview from a DNG.
And I dont know how to avoid it that the previewimage grabs the large preview instead of the 640 x 480 as this could lead to have the fullszie preview extracted twice and the 640 x 480 not at all as "thumbnail" and "jpgfromraw" is not in the DNG at all.
Title: Re: FReq: Extracting all previews in one go / comparing metadata directly
Post by: Phil Harvey on June 19, 2012, 12:31:21 PM
In the case where 2 PreviewImage tags are present, they can be accessed individually with -previewimage and -copy1:previewimage, provided you don't have duplicates enabled.

- Phil
Title: Re: FReq: Extracting all previews in one go / comparing metadata directly
Post by: BogdanH on June 19, 2012, 12:55:20 PM
That did the trick, Phil!
Too bad, I will remember that only till tomorrow...

Bogdan
Title: Re: FReq: Extracting all previews in one go / comparing metadata directly
Post by: Beholder3 on June 19, 2012, 01:37:29 PM
Quote from: Phil Harvey on June 19, 2012, 12:31:21 PM
In the case where 2 PreviewImage tags are present, they can be accessed individually with -previewimage and -copy1:previewimage, provided you don't have duplicates enabled.

Is there a way to run that in one single command?

I tried -b -previewImage -w %d%f_640x480.jpg -copy1:previewImage -w %d%f_4928x3264.jpg and it didnt work.
Title: Re: FReq: Extracting all previews in one go / comparing metadata directly
Post by: Phil Harvey on June 19, 2012, 01:56:44 PM
Currently you can not output the values of different tags to different files.  The -w option writes only one output file per image file.

- Phil
Title: Re: FReq: Extracting all previews in one go / comparing metadata directly
Post by: Phil Harvey on March 11, 2013, 08:53:59 AM
ExifTool 9.23 adds the functionality to allow multiple binary tags to be extracted from a single image.  To extract all JPG thumbnails and previews, a command like this may be used:

exiftool -a -b -W %d%f_%t%c.%s -wext jpg DIR

(Note that -W is upper case.)

And by adding the -ee option, this will also extract embedded JPG images from PDF files.

- Phil