Page 1 of 1

How do I force ImageMagick to use x pixel spacing?

Posted: 2013-11-04T13:07:15-07:00
by warnic
Hi.

I have 1217 (jpg) images I am using to create 8 posters in the 0.707:1 ratio that A1/A2/A3 sizes etc use.
The images themselves are 370:410

This is the script I've gotten down so far

Code: Select all

"C:\Program Files (x86)\ImageMagick-6.8.7-Q16\montage.exe" -quality 100 -tile 14x17 -define registry:temporary-path="D:\Temp" -define png:include-chunk=none -mode concatenate  "C:\Users\Master\Desktop\Runs\Run1\*.jpg" "C:\Users\Master\Desktop\Final\FINAL1.png
But obviously the result never strictly adheres to the 0.707:1 ratio.
It would be fine if I used some images twice or skipped out on <50 images, or if there was some even spacing in between
all of the images, but I can't for the life of me find how I add say, 1 pixels, 2 pixels or 3 pixels in between all images so as to adhere to the ratio.

Can someone help me?

Re: How do I force ImageMagick to use x pixel spacing?

Posted: 2013-11-04T13:53:54-07:00
by fmw42
I am not sure what you mean by x pixel spacing. Do you want spaces between the images in each row, but not in each column? Add -geometry +3+0 to your montage command to have 3 pixels of horizontal spacing and 0 pixels of vertical spacing.

Are all the images the very same pixel dimensions of 370x410?


"C:\Program Files (x86)\ImageMagick-6.8.7-Q16\montage.exe" -quality 100 -tile 14x17 -geometry +3+0 -define registry:temporary-path="D:\Temp" -define png:include-chunk=none -mode concatenate "C:\Users\Master\Desktop\Runs\Run1\*.jpg" "C:\Users\Master\Desktop\Final\FINAL1.png


If after the montage, the images are not in the .707:1 ratio, then resize the result


"C:\Program Files (x86)\ImageMagick-6.8.7-Q16\montage.exe" -quality 100 -tile 14x17 -geometry +3+0 -define registry:temporary-path="D:\Temp" -define png:include-chunk=none -mode concatenate "C:\Users\Master\Desktop\Runs\Run1\*.jpg" miff:- | convert - -resize 70.7x100%% "C:\Users\Master\Desktop\Final\FINAL1.png

or

"C:\Program Files (x86)\ImageMagick-6.8.7-Q16\montage.exe" -quality 100 -tile 14x17 -geometry +3+0 -define registry:temporary-path="D:\Temp" -define png:include-chunk=none -mode concatenate "C:\Users\Master\Desktop\Runs\Run1\*.jpg" miff:- | convert - -resize 70.7x100%^%% "C:\Users\Master\Desktop\Final\FINAL1.png

Re: How do I force ImageMagick to use x pixel spacing?

Posted: 2013-11-07T12:23:46-07:00
by warnic
Thanks very much 'fmw32', I had already attempted to use geometry but must have gotten the usage wrong since it gave me an error emssage.

This is the code I'm running and it's splendid:

"C:\Program Files (x86)\ImageMagick-6.8.7-Q16\montage.exe" -quality 100 -tile 9x17 -geometry +90+0 -define registry:temporary-path="D:\Temp" -define png:include-chunk=none "C:\Users\Master\Desktop\Runs\Run1\*.jpg" "C:\Users\Master\Desktop\Final\FINAL1.png

Thanks for assisting.

Re: How do I force ImageMagick to use x pixel spacing?

Posted: 2013-11-07T12:57:02-07:00
by fmw42
Note that for -quality the value means something different for png output than it does for jpg. See http://www.imagemagick.org/script/comma ... hp#quality