ImageMagick

Post date: 29-Apr-2011 08:41:04

January 9th, 2006

I had some jpeg images of a scanned document which I wanted to mail out to someone.  The obvious way to do this is as a pdf rather than make them open a new image for each page.  It turns out ImageMagick is rather good for this. My images are called pg01.jpg, pg02.jpg, and so on.  Type at the bash prompt the following:

$ convert -page A4+0+0 pg*.jpg doc.pdf

And the result is a single pdf with all the images in order. Ooops page 2 was upside down

$ convert -rotate180 pg2.jpg pg2a.jpg

$ rm pg2.jpg

Convert again as above and all done.

ImageMagick is available pretty much whatever you are running Windows, Cygwin, Mac, Linux, BSD, Solaris etc.