Image-ExifTool - Re: Can I insert missing thumbnails in JPGs?

Posted on Fri May 23 01:01:22 2008 by schtroumpftitou in response to 7885 (See the whole thread of 5)
Re: Can I insert missing thumbnails in JPGs?
Hi, Your solution works great on the command line, but I would like to use it inside a perl script. I am using Exiftool 7.00 on ubuntu 8.04.
I have generated the thumbnail with ImageMagick:
convert 05_1821.jpg -thumbnail 160 exif_thumbnail.jpg

I have tried to write
$exifTool->SetNewValue("thumbnailimage", "exif_thumbnail.jpg");,
but it doesn't work, I got an error: [minor] Not a valid image for Composite:ThumbnailImage
I have also tried to read the file first:
open(DAT, $data_file) || die("Could not open file!"); @raw_data=<DAT>; $exifTool->SetNewValue("thumbnailimage", @raw_data); close(DAT);
but i also have an error: Odd number of elements in hash assignment at /usr/share/perl5/Image/ExifTool/Writer.pl line 177
If someone can help me on this problem it would be great. Thanks.
Ithier
Direct Responses: 7923 | Write a response