Page 1 of 1
Center montage in resulting page
Posted: 2017-09-25T07:36:13-07:00
by binarymelon
I'm trying to tile some images (custom playing cards) in a pdf for printing and I'm running into some issues trying to center the resulting montage. I'm using the following command:
Code: Select all
montage -density 300 -tile 3x3 -geometry +20+20 *.png -gravity center -page 2550x3300 output.pdf
and getting this output
https://i.imgur.com/uoWUm3J.png
Re: Center montage in resulting page
Posted: 2017-09-25T08:13:10-07:00
by snibgo
What version of IM?
What does "-gravity center -size 2550x3300" do? I suspect it has no effect.
Please show a reproducible example. This means something that other people can try out, and compare their results to yours.
Re: Center montage in resulting page
Posted: 2017-09-25T08:30:50-07:00
by binarymelon
snibgo wrote: ↑2017-09-25T08:13:10-07:00
What version of IM?
What does "-gravity center -size 2550x3300" do? I suspect it has no effect.
Please show a reproducible example. This means something that other people can try out, and compare their results to yours.
I should also add the size flag was incorrect (should have been page). I had been trying a couple of things and must have copied the wrong command.
Code: Select all
Version: ImageMagick 7.0.7-4 Q16 x86_64 2017-09-24 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
Code: Select all
convert -size 744x1039 xc:black card.png
montage -density 300 -tile 3x3 -geometry +20+20 $(printf 'card.png%.0s ' {1..9}) -gravity center -page 2550x3300 output.pdf
Without gravity:
https://i.imgur.com/JJB9hLO.png
Without both gravity & page:
https://i.imgur.com/iTbllwM.png