I'm using imagemagick to convert a large set of tif images to jpg, using this command:
find /pfad/to/pictures -name \*tif -exec convert -quality 98% "{}" jpeg:"{}" \; -print
This means, the convert command looks like this:
convert -quality 98% "myNice.tif" jpeg:"myNice.tif"
This results in an jepg image, which has -by the way .tif
as filename, but this is okay, because filename (fileextension) doesn't matter in later use.
The Problem is: before converting, the tif file has different IPTC metadata, which can be shown like this (IPTC copyright info as example):
$ convert -format '%[IPTC:2:116]' myNice.tif info:
© by me
after converting
$ convert myNice.tif jpeg:myNice.tif
IPTC information are lost:
$ convert -format '%[IPTC:2:116]' myNice.tif info:
convert-im6.q16: unknown image property "%[IPTC:2:116]" @ warning/property.c/InterpretImageProperties/3831.
Question: Is there any way to preserve the IPTC (and EXIF) metadata while converting from tif to jpeg?
BTW: using exiftool is not an option, because everything should be done in on single find
run.
//Edit: I'm Using ImageMagick 6.9.7-4, libtiff5 4.0.9-5ubuntu0.3, libjpeg-turbo8 1.5.2-0ubuntu5.18.04.4 and libjpeg8 8c-2ubuntu8 which are provided with Ubuntu 18.04 LTS