-size for label

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

-size for label

Post by snibgo »

http://www.imagemagick.org/Usage/text/ says that when pointsize isn't given, and either width or height for size is given, "label:" will choose the best pointsize to fill the width or height, and will set the required height or width.

However, the command:

Code: Select all

"%IMG%convert" -background lightblue -fill blue -size 160x label:Anthony label_size_width.gif
"%IMG%convert" label_size_width.gif -identify null:
... creates an image 160x15, using a small pointsize such that it occupies less than half the width.

Even worse, the command:

Code: Select all

"%IMG%convert" -background lightblue -fill blue -size x40 label:Anthony label_size_height.gif
... never completes. It just makes my CPU fan go crazy.

IM 6.7.9-Q16 on Windows 7.
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: -size for label

Post by fmw42 »

I get the same on IM 6.8.0.5 Q16 Mac OSX Snow Leopard (compiled without PANGO). PNG looks terrible. GIF looks better but is not adjusted for the width

convert -background lightblue -fill blue -size 160x -font arial label:Anthony label_test.png

Image


convert -background lightblue -fill blue -size 160x -font arial label:Anthony label_test.gif

Image
Last edited by fmw42 on 2012-11-21T11:21:34-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -size for label

Post by snibgo »

Isn't this the bugs forum? Or is there another one?
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: -size for label

Post by fmw42 »

snibgo wrote:Isn't this the bugs forum? Or is there another one?
Yes! I am still asleep. :oops: Thanks. Corrected above.
Post Reply