Page 1 of 1

IM7 "label:" and FX expressions with Windows 10

Posted: 2018-05-05T14:58:45-07:00
by GeeMack
Using IM 7.0.7-30 Q16 x64 HDRI from Windows 10 command line, this command...

Code: Select all

magick label:"%[fx:1]" test1.png
... produces this error message and no image...

Code: Select all

magick: no images for write '-write' 'test1.png' at CLI arg 2 @ error/operation.c/CLINoImageOperator/4792.


This command...

Code: Select all

magick -pointsize 50 -background pink label:"ABC %[fx:1] 123" test2.png
... produces this image...

Image

It seems to just stop creating the label when it hits the FX expression.

As described at THIS link, I've always understood FX expressions are supposed to be parsed when creating a "label:".

Re: IM7 "label:" and FX expressions with Windows 10

Posted: 2018-05-05T18:29:45-07:00
by fmw42
fx expression work with -label. -label is not the same as label:. I am not sure label: allows direct fx expression evaluation. The developers will need to provide a definitive answer.

Re: IM7 "label:" and FX expressions with Windows 10

Posted: 2018-05-05T22:03:25-07:00
by snibgo
GeeMack's examples work fine for me with IM v7.0.7-28 on Windows 8.1. The %[fx:] expression can be more than a simple number:

Code: Select all

magick -pointsize 50 -background pink label:"ABC%[fx:1/7]DEF" fxlabel.png
Image

EDIT to add: it also works on v6.9.5-3 and v6.9.9.40.

Re: IM7 "label:" and FX expressions with Windows 10

Posted: 2018-05-05T22:13:06-07:00
by fmw42
This fails for me on IM 7.0.7.29 Q16 Mac OSX

Code: Select all

magick -size 100x -background white label:"%[fx:1]" test1.png
magick: no images for write '-write' 'test1.png' at CLI arg 6 @ error/operation.c/CLINoImageOperator/4792.

Snibgo's command

Code: Select all

magick -pointsize 50 -background pink label:"ABC%[fx:1/7]DEF" fxlabel.png
just shows the image, ABC

Re: IM7 "label:" and FX expressions with Windows 10

Posted: 2018-05-06T08:16:26-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 @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.

Re: IM7 "label:" and FX expressions with Windows 10

Posted: 2018-05-15T09:57:26-07:00
by GeeMack
This issue appears to be resolved in IM 7.0.7-32. Thanks!