possible bug montage with gravity IM 6.7.7.6 Q16

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 with gravity IM 6.7.7.6 Q16

Post by fmw42 »

IM 6.7.7.6 Q16 Mac OSX Snow Leopard

I am not getting -gravity to work in montage. Images are still centered in the frames.

Input:
Image

convert lena.jpg -crop 120x120 miff:- | montage miff:- -tile x3 -frame 5 -gravity northwest -geometry +5+5 lena_test.jpg

Result:
Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug montage with gravity IM 6.7.7.6 Q16

Post by fmw42 »

Further information.

It is only a problem when the spacing from -geometry is other than zero.

Here is what it looks like if spacing is 0

convert lena.jpg -crop 120x120 miff:- | montage miff:- -tile x3 -frame 5 -gravity northwest -geometry +0+0 lena_test2.jpg

Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug montage with gravity IM 6.7.7.6 Q16

Post by fmw42 »

I am wondering if correct behavior would be as follows:

1) If no size is specified in -geometry, only offsets, then keep each image to its proper size as in my last example above. But allow spacing via -geometry offsets to be permitted without padding to have all images be the same size.

2) Use size 0x0 in -geometry to mean to pad the images to the same size as the max image, but not resize. Then permit -gravity to align them in the frame as desired.

3) When non-zero size is specified, then resize to that size as is currently done.

I do not know if this is practical or not. But it could be a possible enhancement for the future.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: possible bug montage with gravity IM 6.7.7.6 Q16

Post by anthony »

I think this should be left until we get around to doing 'layout' operations (which should encompass montage grids and even appending).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug montage with gravity IM 6.7.7.6 Q16

Post by fmw42 »

anthony wrote:I think this should be left until we get around to doing 'layout' operations (which should encompass montage grids and even appending).

Agreed. I can get a montage format that is presentable for my purpose for now.
Post Reply