Sunday, 23 December 2007

imagemagick postscript file generation...

When doing batch processing/manipulation of images imagemagick is one of the most powerful tools around. And the best of it, it open source -GNU to be exactly, so I will not call it free ;-)-

But as with most powerful tools you will need to understand the manual to start working with it properly and hereby comes the problem; I was looking for a way to convert scanned images from a book back together to a postscript document. Running

convert -page letter p*.jpg
did result into a ps document with a lot of very small pictures. Fixing it was not very easy, cause I had to find one implicit fact; Postscript files by default have a DPI of 72, imagemagick convert every picture which needs to be included to 72 DPI and thereby scales the picture down to a smaller format.

To avoid this make sure to explicitly 'downgrade' your picture using the density setting.

convert -page letter -density 72 p*.jpg

No comments:

Post a Comment