Page 1 of 1
Annotate in all CAPS
Posted: 2017-03-10T15:57:53-07:00
by Videomajk
Hello
I want to extract a piece of IPTC metadata from an image and use annotate to write it onto the image. I use the following command:
Code: Select all
-font Bitstream-Arrus-Italic-BT -pointsize 14 -annotate 0x0+0+20 "%[IPTC:2:92]"
The problem is that I want to type the ITPC value in all caps, ragardles of how the value is typed in the image metadata. Is there a way to do this?
IM7 on Windows 10
Re: Annotate in all CAPS
Posted: 2017-03-10T16:07:15-07:00
by snibgo
Not with just ImageMagick, no. You can extract the metadata, capitalise with another program, and feed that back to IM.
Re: Annotate in all CAPS
Posted: 2017-03-10T16:55:53-07:00
by GeeMack
Videomajk wrote: ↑2017-03-10T15:57:53-07:00The problem is that I want to type the ITPC value in all caps, ragardles of how the value is typed in the image metadata. Is there a way to do this?
IM doesn't have a way to do that, but... There are several fonts that are all caps. Most seem to have at least small differences between the upper and lower case version of each character, but depending on your need, that might not be an issue. There are also various font design and editing programs, some of which are supposed to be fairly easy to use. Constructing your own font by using the same set of characters for both upper and lower case might be an option.
Keep in mind that the font you use doesn't have to be actually installed on your system to work in IM. You can simply call the font file by name into your command using something like "... -font "path/to/the_font.ttf" ...".
Re: Annotate in all CAPS
Posted: 2017-03-10T17:09:20-07:00
by fmw42
In Unix, you can pipe the output of your EXIF or IPTC data to sed to change the text to all caps in line. I do not know if that works in Windows. Or extract the text data, convert to all caps and save to a variable and then use the variable to annotate your image. So something like
Code: Select all
cap_text=$( convert image -format "%[IPTC::2:92]" info: | sed 's/[a-z]/[A-Z]/g' )
Re: Annotate in all CAPS
Posted: 2017-03-10T23:27:51-07:00
by Videomajk
Thanks everyone.
I think I'll try to find a font with an all caps style.