With Wings As Eagles: Craig P. Steffen's Blog

it slices, it dices...

2006 May 17 08:15

Using open source software is both a blessing and curse. If I want a software package that does a certain job, I can almost certainly find something to do that job. What I may end up with is several packages that do almost what I'm looking for, but not quite how I want it. That is, of course, how so many of this packages were created, because someone had a job to do and didn't have the tool, so they made it themselves.

I'm happy to report that there is a really slick command-line tool for image processing that does a remarkable job of doing what you want in a sensible way. The package is called imagemagick, and it's available as a Debian package. It contains a bunch of command line tools that manipulate images in sensible ways according to your command line arguments.

The tool in the package that I've used so far is convert. This converts one type of image to another, in a batch fashion. It seems to be smart enough to figure out what you likely want to do. For instance, if I invoked it thus:

convert image1.jpg image2.jpg image3.jpg output.pdf
it would create a new pdf file containing 3 pages, the first one being a pdf translation of image1.jpg and so on.

I'm currently using this tool to take a bunch of photos of pages of a book and make that into a pdf file that is a virual photocopy of the book.