convert -distort resize / Keep EXIF

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
tackd
Posts: 42
Joined: 2013-12-30T07:39:08-07:00
Authentication code: 6789

convert -distort resize / Keep EXIF

Post by tackd »

System : Debian 64 Sid
Imagemagick : Version: 6.9.7.4+dfsg-2
Image DSC_0622-F.tif TIFF 6000x4000 6000x4000+0+0 8-bit sRGB 72.12MB 0.000u 0:00.009

I wish not to loose exif when doing the below conversion...

Code: Select all

convert DSC_0622-F.tif -colorspace RGB -filter Catrom -density 72 -units PixelsPerInch -distort resize 3000 -colorspace sRGB Result.tif
Is this possible to keep the EXIF on the Result.tif ?

Thank you.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert -distort resize / Keep EXIF

Post by fmw42 »

Have you tried adding -define tiff:exif-properties=true either before or after reading the input tiff. Try both ( but probably before ).

I note that a simple copy of a jpg with exif data to a tif also loses the EXIF data. Copying from jpg to jpg seems to keep the exif data.

Your command works fine with jpg and keeps the exif data

Code: Select all

convert DSC_0001.JPG -colorspace RGB -filter Catrom -density 72 -units PixelsPerInch -distort resize 3000 -colorspace sRGB Result.jpg

Can you provide your input tiff file, so I can test with it. Or any tif file that has exif data.
tackd
Posts: 42
Joined: 2013-12-30T07:39:08-07:00
Authentication code: 6789

Re: convert -distort resize / Keep EXIF

Post by tackd »

Wow.

Thank you so much fmw42.
Worked great;

Code: Select all

convert -define tiff:exif-properties=true DSC_0622-F.tif -colorspace RGB -filter Catrom -density 72 -units PixelsPerInch -distort resize 3000 -colorspace sRGB Result.tif
[SOLVED]
Post Reply