[英]ImageMagick Montage With Exiftool output as -label
I am working on creating contact sheets with Image Magick's montage command. 我正在使用Image Magick的蒙太奇命令创建联系表。 I would like to include particular meta data as the
-label
for the contact sheet images. 我想包括特定的元数据作为联系表图像的
-label
。 I am pulling the data using exiftool: 我正在使用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. 但是,我遇到了
-label
的问题,其中包含$dailyImages
目录中所有文件的创建者,而不是每个文件的创建者。
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
. 是否有人能够使用exiftool命令提取单个文件的“创建者”并将其通过管道传递到montage命令中,因此联系表上的相应图像为
$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
) (如果您不熟悉,则
-label %t_$creator
的%t
内置于Image Magick中,以提供文件名作为-label
)
Given what I said above, if you want some EXIF data that ImageMagick supports, then you can do for example: 鉴于以上所述,如果您想要ImageMagick支持的一些EXIF数据,则可以执行以下操作:
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. 这也适用于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. 因此,一切似乎都指向EXIF数据中缺少Creator字段。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.