Retain/copy Exif data when converting from tiff to jpg?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
joshuamarcoe

Retain/copy Exif data when converting from tiff to jpg?

Post by joshuamarcoe »

Hi,

I have the following command that converts some of my scanned images from tiff to jpg for my website. Is there any way to retain some or all of the Exif data that I inserted into the tiff files when I do this conversion (or a similar conversion) to jpg. My only option so far has been to reinsert the Exif data.

Here is the batch script code (Windows OS), and the imagemagick commands.

for /f %%W in ('dir /o:n /b *.tif*') do montage -frame 5 -quality 75 -pointsize 50 -geometry +0+0 -label "%%~nW" %%W JPGVersion\%%~nW.jpg

I am using some of the Exif and IPTC data fields to add metadata to my images (stored in an Excel spreadsheet), so they will automatically populate the metadata fields in Gallery 2, a image displaying software package for websites, when I upload the images into Gallery 2.

Thanks,

J
joshuamarcoe

Re: Retain/copy Exif data when converting from tiff to jpg?

Post by joshuamarcoe »

I now have one idea how to do this...

Use a separate program called exiv2 to dump all file metadata (IPTC, Exif, and XMP) to a file, use ImageMagick to do a conversion, and then repopulate the appropriate metadata back into the file.

JM
Post Reply