Page 1 of 1

Wrong height with -tile option in Montage

Posted: 2017-11-19T02:01:52-07:00
by kao
Hello,

I think, I encountered a bug with Montage.
I use 8:6.9.7.4+dfsg-16 on a Debian "testing" system.

I want to build a tile set of 24 images.
Each image has the same properties

Code: Select all

identify boat_01_01.png 
boat_01_01.png PNG 128x128 128x128+0+0 8-bit sRGB 7.89KB 0.000u 0:00.000
I build a 8 by 8 tile set with this command :

Code: Select all

montage boat*.png  -tile 8x8 -background none tilset_01.png
Next I read the properties of the output :

Code: Select all

identify tilset_01.png 
tilset_01.png PNG 1024x1008 1024x1008+0+0 16-bit sRGB 403KB 0.000u 0:00.000
Height should be 1024 like the width (128x8 = 1024), instead I have got 1008 like if the images were 126 px high (1008/8 = 126)

In this case, images have been resized. But It shouldn't be.
I used Gimp to see the difference between the originals and the output.

To get a proper montage I use the geometry option to get the proper height

Code: Select all

montage boat*.png  -tile 8x8 -geometry 128x128 -background none tilset_02.png
identify tilset_02.png 
tilset_02.png PNG 1024x1024 1024x1024+0+0 8-bit sRGB 162KB 0.000u 0:00.000
I this case, images have not been resized.
This is the correct behavior we should expect.

Kind regards
Kao

Re: Wrong height with -tile option in Montage

Posted: 2017-11-19T03:18:52-07:00
by dlemstra
What is the output of `identify boat*.png`?

Re: Wrong height with -tile option in Montage

Posted: 2017-11-19T08:26:52-07:00
by kao
The full output :

Code: Select all

boat_01_00.png PNG 128x128 128x128+0+0 8-bit sRGB 8.19KB 0.000u 0:00.000
boat_01_01.png PNG 128x128 128x128+0+0 8-bit sRGB 7.89KB 0.000u 0:00.000
boat_01_02.png PNG 128x128 128x128+0+0 8-bit sRGB 8.05KB 0.000u 0:00.000
boat_01_03.png PNG 128x128 128x128+0+0 8-bit sRGB 6.4KB 0.000u 0:00.000
boat_01_04.png PNG 128x128 128x128+0+0 8-bit sRGB 8.04KB 0.000u 0:00.000
boat_01_05.png PNG 128x128 128x128+0+0 8-bit sRGB 7.53KB 0.010u 0:00.000
boat_01_06.png PNG 128x128 128x128+0+0 8-bit sRGB 7.68KB 0.000u 0:00.000
boat_01_07.png PNG 128x128 128x128+0+0 8-bit sRGB 6.79KB 0.000u 0:00.000
boatMoving_01_00.png PNG 128x128 128x128+0+0 8-bit sRGB 8.54KB 0.000u 0:00.000
boatMoving_01_01.png PNG 128x128 128x128+0+0 8-bit sRGB 8.26KB 0.000u 0:00.000
boatMoving_01_02.png PNG 128x128 128x128+0+0 8-bit sRGB 8.47KB 0.000u 0:00.000
boatMoving_01_03.png PNG 128x128 128x128+0+0 8-bit sRGB 6.86KB 0.000u 0:00.000
boatMoving_01_04.png PNG 128x128 128x128+0+0 8-bit sRGB 8.43KB 0.000u 0:00.000
boatMoving_01_05.png PNG 128x128 128x128+0+0 8-bit sRGB 7.94KB 0.000u 0:00.000
boatMoving_01_06.png PNG 128x128 128x128+0+0 8-bit sRGB 8.12KB 0.000u 0:00.000
boatMoving_01_07.png PNG 128x128 128x128+0+0 8-bit sRGB 7.22KB 0.000u 0:00.000
boatMoving_01_10.png PNG 128x128 128x128+0+0 8-bit sRGB 8.54KB 0.000u 0:00.000
boatMoving_01_11.png PNG 128x128 128x128+0+0 8-bit sRGB 8.37KB 0.000u 0:00.000
boatMoving_01_12.png PNG 128x128 128x128+0+0 8-bit sRGB 8.61KB 0.000u 0:00.000
boatMoving_01_13.png PNG 128x128 128x128+0+0 8-bit sRGB 7.01KB 0.000u 0:00.000
boatMoving_01_14.png PNG 128x128 128x128+0+0 8-bit sRGB 8.52KB 0.000u 0:00.000
boatMoving_01_15.png PNG 128x128 128x128+0+0 8-bit sRGB 7.98KB 0.000u 0:00.000
boatMoving_01_16.png PNG 128x128 128x128+0+0 8-bit sRGB 8.21KB 0.000u 0:00.000
boatMoving_01_17.png PNG 128x128 128x128+0+0 8-bit sRGB 7.34KB 0.000u 0:00.000

Re: Wrong height with -tile option in Montage

Posted: 2017-11-19T12:02:16-07:00
by fmw42
try adding the offsets to -geometry. You do not need the image size.

Code: Select all

montage boat*.png  -tile 8x8 -geometry +0+0 -background none tilset_02.png

Re: Wrong height with -tile option in Montage

Posted: 2017-11-21T01:04:48-07:00
by kao
@fmw42
Your command works well, images are not resize.

It's even better, I get only 3 rows (24 boats images/8), instead of 8 with 5 empty.
h = (24/8)*128 = 384;

Code: Select all

identify tilset_02.png 
tilset_02.png PNG 1024x384 1024x384+0+0 8-bit sRGB 159KB 0.000u 0:00.000
Thanks