Hi,
I know how to extract thumbnails from JPG
For 3 images (for example) I simply do
exiftool -a -m -b -W %d%f_%t%-c.%s -preview:ThumbnailImage a.jpg b.jpg c.jpg
For a folder I do: exiftool -a -m -b -W %d%f_%t%-c.%s -preview:ThumbnailImage .
But how do I save them to another folder like /tmp ?
As %d in above command is the directory (and %f the filenamw), I tried things like: exiftool -a -m -b -W '/tmp/'%f_%t%-c.%s -preview:ThumbnailImage .
where I tried /tmp/, '/tmp/' and a few more
I tried above commands also with options like '-directory=/tmp'
But all unsuccessful (otherwise I would not have this question :) )
So my question: Is this possible OR what am I doing wrong?
Edit: I know the exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg, which means I would have to loop through all the images, which is not really efficient, but if nothing else is possible I will do this.
Replace the %d with the path you want to use. That is the token that indicates the directory of the current file.
Quote from: StarGeek on September 29, 2020, 01:56:50 PM
Replace the %d with the path you want to use. That is the token that indicates the directory of the current file.
Sorry, but I thought that is what I mentioned in my post and showed in my command?
QuoteAs %d in above command is the directory (and %f the filenamw), I tried things like: exiftool -a -m -b -W '/tmp/'%f_%t%-c.%s -preview:ThumbnailImage .
Am I overlooking something?
Quote from: hvdwolf on September 29, 2020, 01:18:53 PM
exiftool -a -m -b -W '/tmp/'%f_%t%-c.%s -preview:ThumbnailImage .
This should work on Mac/Linux. Without the quotes it should work on all operating systems. I tested it here and it works fine for me. Why do you say it doesn't work? What messages does ExifTool give?
- Phil
Quote from: hvdwolf on September 29, 2020, 02:06:48 PM
Sorry, but I thought that is what I mentioned in my post and showed in my command?
Sorry, I didn't read carefully enough. But as Phil said, that would be the format. Maybe a permission problem?
I'm sorry.
I used the command, but probably with a typo or something like that, and it didn't work.
Then I used exiftool -a -m -b -W %f_%t%-c.%s -preview:ThumbnailImage . '-directory=/tmp' (so without the replaced %d but with a destination directory).
This moved the JPGs in the folder into /tmp, but I thought it had copied them and didn't check the source folder carefully enough.
So I used the previous command exiftool -a -m -b -W '/tmp/'%f_%t%-c.%s -preview:ThumbnailImage . again (and again with *.jpg instead of .), but never checked whether the jpgs were still in the folder. I only checked if the thumbnails were created in /tmp.
I am sorry for wasting both of your time.