possible bug montage IM 7.0.3.4 Q16 Mac OSX

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug montage IM 7.0.3.4 Q16 Mac OSX

Post by fmw42 »

Montage does not seem to honor either -gravity or %[fx:...] computations. Both of the following commands try to center the rose: image under the granite: image. But the result is always southwest centered.

Code: Select all

magick montage granite: rose: -background none -tile 1x2 -gravity south -geometry +0-10 result.png

Code: Select all

magick montage granite: rose: -set option:offx '%[fx:(u.w-v.w)/2]' -background none -tile 1x2 -geometry '+%[offx]-10' result.png
montage: invalid argument for option '-geometry': +%[offx]-10 @ error/montage.c/MontageImageCommand/1029.

or

Code: Select all

magick montage granite: rose: -background none -tile 1x2 -geometry '+%[fx:(u.w-v.w)/2]-10' result.png
montage: invalid argument for option '-geometry': +%[fx:(u.w-v.w)/2]]-10 @ error/montage.c/MontageImageCommand/1029.

Result:
Image
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: possible bug montage IM 7.0.3.4 Q16 Mac OSX

Post by GeeMack »

fmw42 wrote:Montage does not seem to honor either -gravity or %[fx:...] computations. Both of the following commands try to center the rose: image under the granite: image. But the result is always southwest centered.
In your last example you have a double square bracket "]]" at the end of the FX expression....

Code: Select all

magick montage granite: rose: -background none -tile 1x2 -geometry '+%[fx:(u.w-v.w)/2]]-10' result.png
The error still occurs without it (even on IM 7.0.3-4 on Windows 10 64) so it's not the source of the problem. Just pointing out that typo.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug montage IM 7.0.3.4 Q16 Mac OSX

Post by fmw42 »

Thanks, Geemack. It was a typo. I have fixed it above. Thanks for confirming on Windows.
Post Reply