Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several JPG files from a PDF file, so concatenating the JPG files need to be "under each other". How can I do this?

share|improve this question
maybe "montage" do it from imagemagick.. but how? – gasko peter Jan 15 '13 at 8:46
Do you know about ImageMagick? – Eddy_Em Jan 15 '13 at 8:47
ROWS="4"; montage -density 300x300 -tile 1x$ROWS *.jpg output.jpg but it produces low quality images.. – gasko peter Jan 15 '13 at 8:52
up vote 3 down vote accepted
ROWS="4"; montage -geometry 2550 -tile 1x$ROWS *.jpg output.jpg

geometry -> you need to know the original picture width, or at least give this a good value so the quality could be enough

tile -> how many "columns x rows" will the output have? (from the original jpg files) - $ROWS could be calculated with "ls -1 *.jpg | wc -l" if one folder contains all the jpg files.

*.jpg -> input jpg files

output.jpg -y the output jpg

share|improve this answer
Small explanation and link to montage website could improve your answer a lot. – Bernhard Jan 15 '13 at 9:05
accept this answer if this satisfies you :-) – harish.venkat Jan 15 '13 at 9:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.