possible bug label IM 6.8.4.9 Q16 Mac OSX Snow Leopard

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug label IM 6.8.4.9 Q16 Mac OSX Snow Leopard

Post by fmw42 »

I am finding that label: does not seem to work well to best fit, especially when the height is given.

This sort of works, though a bit short of the width.
convert -size 200x -background lightblue -fill black -font arial label:"MY NAME IS ELVIS MONTEZUMA" show:

This does not seem to fill the height and stretch the width accordingly.
convert -size x200 -background lightblue -fill black -font arial label:"MY NAME IS ELVIS MONTEZUMA" show:

I assume that it should find a pointsize to fill the height and then make the width whatever is needed for that pointsize. But it does not seem to do that.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug label IM 6.8.4.9 Q16 Mac OSX Snow Leopard

Post by magick »

Label is designed to fill the label width (1D) whereas caption is designed to fill the width & height (2D). Given these assumptions, do you still feel there is a bug?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug label IM 6.8.4.9 Q16 Mac OSX Snow Leopard

Post by fmw42 »

magick wrote:Label is designed to fill the label width (1D) whereas caption is designed to fill the width & height (2D). Given these assumptions, do you still feel there is a bug?

Yes, I still consider it a bug. Label: and caption: have some overlap, but they really do different things.

Perhaps my explanation was not clear. I am simply asking that label: fit all the text onto one line such that the height of the text fills the specified height (by fitting internally to the appropriate pointsize) and make the width as long as necessary. I am not asking that label: act like caption: to break the text into multiple lines to fill the height.

More importantly, see Anthony's last example where he uses x40 for best fit of label to the specified 40 pixel height at http://www.imagemagick.org/Usage/text/#label_bestfit
Post Reply