Caption clips

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

Caption clips

Post by snibgo »

In IM v6.8.5-0 (on Windows 7), "caption:" clips words where 6.8.4-0 didn't. I don't know if this is a new bug or a fix of an old bug. In other words, I don't know if 6.8.4 or 6.8.5 is correct. Examples:

Code: Select all

rem These two clip the long word:

convert -size 50x200 -pointsize 20 caption:"abc defghijklmnop" c1.png

convert -size 50x -pointsize 20 caption:"abc defghijklmnop" c2.png

Code: Select all

rem The next two are okay:

convert -size x200 -pointsize 20 caption:"abc defghijklmnop" c3.png

convert -size 50x200 caption:"abc defghijklmnop" c4.png

In 6.8.4, only c2 is bad. The other versions show all the characters (possibly by splitting words).

Code: Select all

convert -size 50x200 -pointsize 20 caption:"abc defghijklmnop" c1.png

convert -size 50x -pointsize 20 caption:"abc defghijklmnop" c2.png

Code: Select all

rem The next two are okay:

convert -size x200 -pointsize 20 caption:"abc defghijklmnop" c3.png

convert -size 50x200 caption:"abc defghijklmnop" c4.png
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Caption clips

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.5-9 Beta available by sometime tomorrow. Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Caption clips

Post by fmw42 »

In IM 6.8.5.10 Q16 beta, the first does not seem to work - it gets cut off. The second seems to work

imb convert -size 50x200 -pointsize 20 caption:"abc defghijklmnop" c1.png
Image

imb convert -size 50x -pointsize 20 caption:"abc defghijklmnop" c2.png
Image
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Caption clips

Post by magick »

Its working. ImageMagick only computes splits if height is not defined. We assume the user knows what they are doing if each of width / height / pointsize are defined. This is a similar behavior with labels.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Caption clips

Post by fmw42 »

thanks for the clarification.
Post Reply