News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Re-create thumbnail after crop image

Started by esancha, June 30, 2013, 03:19:39 AM

Previous topic - Next topic

esancha

After cropping a photo and import to the Exif data of the original photo, the included thumbnail does not correspond with the cropped photo.

I've seen methods to import a thumbnail to an image, but, is there some method of Exiftool to recreate the thumbnail of an image?

Thanks a lot.

Emilio

Phil Harvey

Hi Emilio,

Sorry, no.  ExifTool does not do image manipulations.

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

esancha

Many Thanks Phil

Maybe can someone tell me any application with which to create the thumbnail of the cropped image?

Thanks again.

PS: I used to use Exiftool to those things but I'm afraid that it is not too appropriate.

Phil Harvey

I use ImageMagick's "convert" utility to do image manipulations like this.  Once you have generated the thumbnail, ExifTool can insert it into the JPEG for you.

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

evilaro

Hi Phil:

I wonder if this ImageMagick can be used
in the command line... in Windows?.

Among the so many different version of this program there is one
for windows... but I can not make it work...

Any advice.

Thanks
The other Emilio ;)




Quote from: Phil Harvey on June 30, 2013, 07:57:17 PM
I use ImageMagick's "convert" utility to do image manipulations like this.  Once you have generated the thumbnail, ExifTool can insert it into the JPEG for you.

- Phil
www.evilfoto.eu
*************

Phil Harvey

Sorry, I haven't tried ImageMagick in Windows.  Maybe someone else here has experience with this.

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

esancha

Thanks Phil  :D, Saludos tocayo ;)

I'll try mageMagick.

StarGeek

To do this on a single file, you could use this command (replace <file> with the full path to the file):
convert -thumbnail 100x100 -quality 80 -strip <file> jpeg:- | ExifTool "-ThumbnailImage<=-" <file>

or create a .bat file with this
convert -thumbnail 100x100 -quality 80 -strip %1 jpeg:- | ExifTool "-ThumbnailImage<=-" %1

For a bigger/smaller thumb, change the "100x100" to whatever size you want the thumb to be bounded by.  Add other options  into the ExifTool part as you need. 

For processing multiple files, things would get a bit tricky, as ImageMagick's Convert command will only operate on single files.  I see bat file examples where you could do a directory like this, but I don't know enough about windows bat files to tell if you could make one where you could pick a few files out of a directory or not.

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).