possible bug montage IM 6.7.9.5 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 IM 6.7.9.5 Q16

Post by fmw42 »

IM 6.7.9.5 Q16 Mac OSX Snow Leopard.

I am trying to make a 3x3 montage with a hole in the middle. But the hole always appears to the right of center, i.e. at -gravity east rather than center. Note there also appears to be a slight gap between tiles 3 and 4, which is more obvious when using -background red.

Is this a bug or am I doing something wrong?. See http://www.imagemagick.org/Usage/montage/#null

Here is my test with 8 copies of rose: and 1 null: in the fourth position.

montage -tile 3x3 -background red -geometry +0+0 rose: rose: rose: rose: null: rose: rose: rose: rose: rose_montage.png

Image
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: possible bug montage IM 6.7.9.5 Q16

Post by glennrp »

Your "null" image is right where it belongs, but it's only one pixel wide.
Try with "-size 70x46" ahead of "null:". The "-gravity" option is used to
place each image within its tile, not to place the tiles within the montage.

The referenced documentation
http://www.imagemagick.org/Usage/montage/#null
omits mention of "-size". I don't know if it was needed in the past.
The oldest version I have conveniently at hand exhibits the same
behavior; it is IM-6.6.8-10.
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 6.7.9.5 Q16

Post by fmw42 »

glennrp wrote:Your "null" image is right where it belongs, but it's only one pixel wide.
Try with "-size 70x46" ahead of "null:". The "-gravity" option is used to
place each image within its tile, not to place the tiles within the montage.

The referenced documentation
http://www.imagemagick.org/Usage/montage/#null
omits mention of "-size". I don't know if it was needed in the past.
The oldest version I have conveniently at hand exhibits the same
behavior; it is IM-6.6.8-10.

Thanks Glenn. Makes sense and does work. It is also interesting that the montage docs do not mention a -size argument either.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: possible bug montage IM 6.7.9.5 Q16

Post by anthony »

You are accidentally invoking concatenation mode (zero geometry), which only works well for images that are all the same size.

To have montage work as expected you need to use a non-zero geometry.. Specifically use -geometry '1x1+0+0<' instead of -geomtery +0+0

See IM Examples, Montage, Zero Geometry, caution required
http://www.imagemagick.org/Usage/montage/#zero_geometry


Eventually I hope to expand 'append' in "convert" (actually IMv7 "magick") command, to provide multiple 'layout' operators, including the grid layout that is currently only available from the "montage" command. Other layouts planed include, justified lines, or columns.

See current proposal (no work done on this as yet), comments welcome.
http://www.imagemagick.org/Usage/bugs/future/#layout
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply