Pregunta

I'm using Imagemagick to join some PNG files and output them to a PDF file.

I'm using this command: montage *.png -mode Concatenate -tile 4x2 outputA3.pdf

But lets say that I only have 3 images available (same dimmension) and I still want to join them in a 4x2 tile.

Something like this: (WS stands for white space)

| IMG1 | IMG2 | IMG3 |  WS  |
|  WS  |  WS  |  WS  |  WS  |

Is it possible to add white space with the dimension of the images?

If so how can I do this?

Thanks

¿Fue útil?

Solución

Instead of using Concatenate mode you can remove the gaps using the option

-geometry '1x1+0+0<'

The geometry flag specifies the perferred tile and border size. The geometry of 1x1+0+0< tells it to remove the border (the 0+0 part) and to enlarge images smaller than 1x1 (the 1x1< part).

The 1x1 resize is necessary since if you use a 'zero geometry' it will automatically put it into concatenate mode (see here).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top