Annotate, (and draw) gives odd result

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
nsh
Posts: 27
Joined: 2006-05-16T01:52:23-07:00

Annotate, (and draw) gives odd result

Post by nsh »

first, Sorry if this is a duplicate post. but i can't find a post about this issue. When using annotate on one server it gives attached result (see image below).

what can be wrong in the installation ?

ps, i have tested two different ways, with draw, and with annotate, same result.

convert $1 \
-size 1x18 xc:Yellow -background Yellow -append \
-gravity South -draw "text 0,0 'Faerie Dragon'" \
$2

convert \
$1 \
-gravity South -background YellowGreen -splice 0x18 \
-annotate +0+5 'Digitaljobb' \
$2

Image
Image
btw, it works on my local mac, but not on a sparc solaris server...

sparc,

Version: ImageMagick 6.2.9 09/22/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

mac,

Version: ImageMagick 6.2.9 09/23/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
nsh
Posts: 27
Joined: 2006-05-16T01:52:23-07:00

Re: Annotate, (and draw) gives odd result

Post by nsh »

After some research and trial and error, i found that i need to give the option -font Helvetica to get the annotate to function

convert testimage.jpg -gravity South -background YellowGreen -splice 0x18 -font Helvetica -draw "text 0,0 'Anthony'" ut.jpg

convert testimage.jpg -gravity South -background YellowGreen -splice 0x18 -font Helvetica -annotate 0x0 test ut2.jpg

strange that no errors where produced when missing -font if it's required...
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Annotate, (and draw) gives odd result

Post by Bonzo »

You are also missing a pointsize and fill for the font. As far as I know IM uses default fonts, colours and size if nothing specified; I always put them in to be safe.
I wonder if there is no default font in your setup ? I was doing a similar thing for another post on the forum last night and my home system would draw and annotate an image even though I had not specified the font, fill or size.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Annotate, (and draw) gives odd result

Post by anthony »

You can always upload a TTF font to use directly, as it looks like the IM installation with regards to fonts is pooched.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply