Best Fit not working on label command

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
ahecht
Posts: 1
Joined: 2013-01-02T14:13:10-07:00
Authentication code: 6789

Best Fit not working on label command

Post by ahecht »

The following code should produce a label that fits the image size. However, it instead renders the text at 96pt, which doesn't fill the image:

Code: Select all

convert -gravity south -size 1015x169 label:Anthony label.png
Image

I am using ImageMagick-6.8.1-8 from ImageMagick-6.8.1-8-Q16-x86-windows.zip (interestingly, convert -version reports "Version: ImageMagick 6.8.1-6 2012-12-29 Q16")
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Best Fit not working on label command

Post by fmw42 »

I can confirm those results on IM 6.8.1.7 Q16 Mac OSX Snow Leopard using:

convert -size 1015x169 -gravity south label:Anthony show:

or

convert -size 1015x169 label:Anthony show:


Neither fill the image either in width or height.

It appears that some default pointsize is being specified contrary to the documentation at

http://www.imagemagick.org/Usage/text/#label
vs
http://www.imagemagick.org/Usage/text/#label_bestfit

The latter implies that if no pointsize is specified, it should fill at least one dimension of the image.


Caption: appears to work properly

convert -size 1015x169 -gravity south caption:Anthony show:
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Best Fit not working on label command

Post by snibgo »

On Windows, it works as it should in 6.7.9 but gives the wrong size in 6.8.0.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Best Fit not working on label command

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.1-9 Beta available by sometime tomorrow. Thanks.
Post Reply