Insert exif data during convert

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
rogierl
Posts: 2
Joined: 2017-06-07T01:15:58-07:00
Authentication code: 1151

Insert exif data during convert

Post by rogierl »

I have the following convert cmd which I use to resize a lot of images. I make use of the - strip command, but I do want to add one specific exif attribute ("copyright"). Is this possible? I know I can use exiftool for this, but isn't this possible in "one call" to the convert tool?
convert -type TrueColorAlpha \
-colorspace sRGB \
-define tiff:ignore-layers=true \
-fuzz 1000 \
-trim +repage \
-background red \
-alpha remove \
-resize 125x200 \
-filter lanczos2 \
-type TrueColor \
-colorspace sRGB \
-sampling-factor 4:2:0 \
-interlace none \
-quality 90 \
-density 72x72 \
-strip \
input.png \
output.jpg
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Insert exif data during convert

Post by fmw42 »

No, as far as I know ImageMagick does not write EXIF data to a file. It should pass existing information on, but will not write new EXIF data to a file. You may write that information into the comment field or the label field via -set comment or -set label. Otherwise, as you noted, you can use EXIFTOOL.
Post Reply