How to Draw Text with a Semicolon

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Larsenv
Posts: 10
Joined: 2016-05-15T08:49:00-07:00
Authentication code: 1151

How to Draw Text with a Semicolon

Post by Larsenv »

I'm using this code on a Mac today.

Code: Select all

convert -size 1280x720 xc:none -font ./resources/Rodin-B.otf -pointsize 36 \
		   -stroke white -strokewidth 5  -draw "text 586,375 Released:" \
           -fill gradient:#0a0a0a:#2e2e2e  -draw "text 586,375 RELEASED:" \
           bootTvTex-Text1.png
It gives this to me in return.

Code: Select all

convert: non-conforming drawing primitive definition `:' @ error/draw.c/DrawImage/3173.
How can I fix this?

Thanks.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to Draw Text with a Semicolon

Post by snibgo »

Your text needs to be quoted. Try single-quotes.

Code: Select all

'RELEASED:'
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to Draw Text with a Semicolon

Post by fmw42 »

You need to put single quotes about the text in a draw command. See http://www.imagemagick.org/Usage/text/#draw

Also your gradient is not correct. Gradient colors are not separated by colons. They are separated by a hyphen and if you are using hex or rgb colors, then the whole value must be enclosed in double quotes.

See http://www.imagemagick.org/script/gradient.php
Post Reply