Page 1 of 1

possible bug montage IM 6.7.9.5 Q16

Posted: 2012-09-14T11:51:41-07:00
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

Re: possible bug montage IM 6.7.9.5 Q16

Posted: 2012-09-14T13:02:42-07:00
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.

Re: possible bug montage IM 6.7.9.5 Q16

Posted: 2012-09-14T13:41:24-07:00
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.

Re: possible bug montage IM 6.7.9.5 Q16

Posted: 2012-09-18T18:44:58-07:00
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