Page 1 of 1

Using CAPTION generates a single line when should be multiline

Posted: 2015-11-25T06:30:26-07:00
by markth
I am using ImageMagick v6.7.5 on OSX under Bitnami MAMP to output some quotations into a large image. I take a background, then overlay a famous quotation and its author, then save the image. The images themselves are quite large (up to around 8,000 pixels x 6,000 pixels).

I am running a PHP script that uses convert:

Code: Select all

convert ani-landscape.jpg \( -background none -fill rgba\(154,134,78,1\) -gravity center -kerning -22 -interline-spacing 1.2 -interword-spacing 90 -font fonts/Delius-Regular.ttf -size 4537x4160 caption:"Lacus convallis a parturient integer lobortis ullamcorper risus hendrerit et leo parturient integer ullamcorper parturient a mauris a parturient metus orci scelerisque interdum dui penatibus magna malesuada parturient." -repage +504+2377 \) \( -background none -fill rgba\(67,59,37,1\) -gravity center -kerning -22 -interline-spacing 11 -interword-spacing 59 -font fonts/Copse-Regular.ttf -size 2767x451 caption:"Quote Author Name" -repage +1389+7119 \) -layers merge 212-outputfile.jpg
Now on very rare occasions the output from the caption line (which is supposed to fill the 4537x4160 area with text of any number of characters from around 25 to over 1,000) fills only one line, like this:

Image

The vast majority of the time the output is fine, like this (which is what it is supposed to look like):

Image

Has anyone experienced this behaviour before? It happens very rarely, like I say - perhaps 1 in 250 times? I can make the text fit the box by slightly changing the interword spacing or kerning, but I want to iron this issue out!

Re: Using CAPTION generates a single line when should be multiline

Posted: 2015-11-25T06:43:09-07:00
by dlemstra
Can you reproduce the issue with the latest version of Imagemagick?

Re: Using CAPTION generates a single line when should be multiline

Posted: 2015-11-25T07:35:04-07:00
by markth
I'm a little scared to upgrade IM as it took me an age to get it installed. I ended up having to use MAMP as it was bundled with it and worked almost out of the box. Is it an easy process?

Re: Using CAPTION generates a single line when should be multiline

Posted: 2015-11-30T05:34:40-07:00
by markth
Right - I managed to upgrade IM to the latest version (6.9.2). The problem does still manifest itself.

Any thoughts?

Re: Using CAPTION generates a single line when should be multiline

Posted: 2015-12-04T01:55:50-07:00
by dlemstra
Can you share your input file and fonts so we can try to reproduce your issue? And the exact command that produced an output that you did not expect.