0

I am working on creating contact sheets with Image Magick's montage command. I would like to include particular meta data as the -label for the contact sheet images. I am pulling the data using exiftool:

$creator = C:\exiftool.exe "-Creator" $image

and creating the montage like so:

montage -verbose -label %t_$creator -pointsize 20 -background '#FFFFFF' -tile '5x40' -fill 'black' -define jpeg:size=600x780 -geometry 600x780+40+150 -quality 90  -auto-orient $dailyImages.FullName E:\Contact_Sheet.jpg

However, I run into an issue of the -label containing the creator for ALL the files in the directory $dailyImages instead of the creator for each respective file.

Is anyone able to use the exiftool command to pull a single file's 'creator' and pipe it into the montage command so the respective image on the contact sheet as $filename_$creator. (In case you are unfamiliar, the %t in -label %t_$creator is built in to Image Magick to provide the filename as the -label)

fmw42
  • 46,825
  • 10
  • 62
  • 80
Garrett
  • 617
  • 12
  • 30
  • If you want this question answered, you will have to post specific output generated by the programs. Those programs are not PowerShell and you cannot expect someone to have them. I am assuming $Creator is an array of strings so you'll probably have to do some type of foreach loop. – Shawn Esterman Nov 16 '17 at 23:15
  • As far as I know, there is no Creator tag. I do not see it at https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html and ImageMagick has no Creator access for its EXIF tags at http://www.imagemagick.org/script/escape.php. Perhaps you can run the full list of exif data using exiftool and present it here to show that the Creator tag exists. Perhaps it is a custom tag? – fmw42 Nov 17 '17 at 02:17
  • Sorry for not providing enough information, -Creator is, as @StarGeek mentioned, a XMP Metadata field. Our files currently have a username in this field. I am using exiftool to extract that information. – Garrett Nov 17 '17 at 13:10

1 Answers1

1

Given what I said above, if you want some EXIF data that ImageMagick supports, then you can do for example:

montage -label "%t %[EXIF:make]" input.jpg output.jpg

I have tested that and it works on an image I have.

This also works for me on ImageMagick 6.9.9.23 Q16 Mac OSX.

make=`convert input.jpg -format "%[EXIF:make]" info:`
montage -label "%t $make" input.jpg output.jpg

This also works for me:

make=`exiftool -make input.jpg | sed 's/ *//g' | cut -d: -f2`
montage -label "%t $make" input.jpg output.jpg

So everything seems to point to the lack of a Creator field in EXIF data.

fmw42
  • 46,825
  • 10
  • 62
  • 80