Page 1 of 1

Best Fit not working on label command

Posted: 2013-01-02T14:20:14-07:00
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")

Re: Best Fit not working on label command

Posted: 2013-01-02T16:22:31-07:00
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:

Re: Best Fit not working on label command

Posted: 2013-01-02T17:28:01-07:00
by snibgo
On Windows, it works as it should in 6.7.9 but gives the wrong size in 6.8.0.

Re: Best Fit not working on label command

Posted: 2013-01-03T06:03:19-07:00
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.