Page 1 of 1
Caption fails to auto-fit in latest v7
Posted: 2016-11-18T08:12:40-07:00
by Bighead
I have a powershell script that uses the name of the file as a watermark over the image. First I generate a caption then use composite to place it over the image. The problem is "caption" is no longer expanding to a new line in the latest
ImageMagick-7.0.3-7-Q16-x64-dll.
The full name of the image is this:
tex1_124x40_3a277be1b9da51b7_2d0d8f84dc3ccc36_8
But this is the result:
Using
ImageMagick-7.0.1-6-Q16-x64-dll there is no problem.
And this is the full command I'm using in PowerShell.
Code: Select all
& $Convert -background transparent -fill $FontColor -undercolor $BGColor -font $FontFace -pointsize $FontSize -size $CaptionWidth -gravity Center caption:$Watermark $CaptionPath
Re: Caption fails to auto-fit in latest v7
Posted: 2016-11-18T10:58:40-07:00
by fmw42
It usually helps more if you give an example that the IM developer can use that has actual values in it.
Re: Caption fails to auto-fit in latest v7
Posted: 2016-11-18T13:42:33-07:00
by Bighead
Sure, all of the variables would loosely translate into this:
Code: Select all
magick.exe -background transparent -fill #FF0000 -undercolor #00FF00 -font Courier-New-Bold -pointsize 8 -size 496x -gravity Center caption:tex1_124x40_3a277be1b9da51b7_2d0d8f84dc3ccc36_8 C:\Users\Bighead\AppData\Local\Temp\CTT-PS_Temp\TempWatermark\cap.png
Re: Caption fails to auto-fit in latest v7
Posted: 2016-11-18T14:10:52-07:00
by fmw42
That command gives me a very small image (496x10) with no line breaks on IM 7.0.3-7 and IM 6.9.6.5 on Mac OSX. Are you sure that is correct?
Code: Select all
magick -background transparent -fill "#FF0000" -undercolor "#00FF00" \
-font Courier-New-Bold -pointsize 8 -size "496x" -gravity Center \
caption:"tex1_124x40_3a277be1b9da51b7_2d0d8f84dc3ccc36_8" \
cap.png
Re: Caption fails to auto-fit in latest v7
Posted: 2016-11-18T23:53:29-07:00
by Bighead
I actually did make a mistake, I forgot that
$FontSize is actually calculated differently so 8 is incorrect for pointsize. Reusing your example it should be....
Code: Select all
magick -background transparent -fill "#FF0000" -undercolor "#00FF00" \
-font Courier-New-Bold -pointsize 39 -size "496x" -gravity Center \
caption:"tex1_124x40_3a277be1b9da51b7_2d0d8f84dc3ccc36_8" \
cap.png
Re: Caption fails to auto-fit in latest v7
Posted: 2016-11-19T07:16:28-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @
https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @
http://www.imagemagick.org/download/beta/ by sometime tomorrow.
Re: Caption fails to auto-fit in latest v7
Posted: 2017-01-25T01:39:00-07:00
by Bighead
I never did get to try the beta version with the patch, but I just wanted to point out this is still an issue in the latest version (ImageMagick 7.0.4-5).
Re: Caption fails to auto-fit in latest v7
Posted: 2017-01-25T05:26:32-07:00
by magick
It looks like the patch did not get pushed to the repository. This oversite is fixed. Look for the patch tomorrow in the beta release of IM 7.0.4-6.