labelling with ImageMagick

I’ve been batch processing hundreds of images, homing in on the most useful ones for my bricoleur ludique website.  My Perl script has proved an exceedingly useful tool. Here, I describe how to create a simple transparent label to add to images.

You need ImageMagick on your machine, and if you’re going to use the PerlMagick API, you might want to look in my DokuWiki to find how to get these installed together on Windows 7.

Adapting Anthony Thyssen’s example:

convert -size 179x36 xc:none -font Segoe-Print -pointsize 20 -stroke black -strokewidth 8 -annotate +7+26 "" -blur 0x8 -fill goldenrod1 -stroke none -annotate +7+26 "" jhfr-label.png

and I’ve created a transparent label with colored text:

png label for

-annotate is counting placing the text 7 pixels in from the left, and 26 down from the top, so for a more discreet label:

convert -size 127x33 xc:none -font Segoe-Print -pointsize 12 -stroke black -strokewidth 8 -annotate +12+21 "" -blur 0x7 -fill darkgrey -stroke none -annotate +12+21 "" jhfr-label.png png label

Next I apply the label to the lower-right corner of one of my photos:

composite -gravity southeast jhfr-label.png originalphoto.jpg labelledphoto.jpg

See the effect here.  When I want to label a load of images in a folder, I turn to my

Share Button