Using CAPTION generates a single line when should be multiline
Posted: 2015-11-25T06:30:26-07:00
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:
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:
The vast majority of the time the output is fine, like this (which is what it is supposed to look like):
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!
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
The vast majority of the time the output is fine, like this (which is what it is supposed to look like):
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!