`mogrify` unable to draw text?

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
jamadagni
Posts: 11
Joined: 2013-12-06T19:03:10-07:00
Authentication code: 6789

`mogrify` unable to draw text?

Post by jamadagni »

Hello. I'm using IM 6.7.7-10 which comes with Kubuntu Trusty 64 bit. Please see the following commands entered at a terminal:

Code: Select all

convert xc:black -resize 1000x600! black.png
mogrify black.png -fill white -stroke blue -font DejaVu-Sans-Book -pointsize 36 -draw 'gravity NorthEast text 0,0 "Hello"'
convert black.png -fill white -stroke blue -font DejaVu-Sans-Book -pointsize 36 -draw 'gravity SouthEast text 0,0 "World"' black-new.png
I find that the final file black-new.png only contains the word World at the bottom right and does not contain the word Hello anywhere. Isn't mogrify supposed to do anything that convert does except that it operates in place?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: `mogrify` unable to draw text?

Post by snibgo »

1. convert can do many things that mogrify can't.

2. Your syntax for mogrify is wrong. The filename should go at the end. With that correction, v6.9.2-5 gives the required result.
snibgo's IM pages: im.snibgo.com
jamadagni
Posts: 11
Joined: 2013-12-06T19:03:10-07:00
Authentication code: 6789

Re: `mogrify` unable to draw text?

Post by jamadagni »

Thank you very much. I should have checked the man page first. Indeed if I put the file name at the end it works.
Post Reply