ImageMagik PDF manipulation rotate, thumbnail, problems

Tethys tethys at gmail.com
Tue Dec 4 15:26:11 UTC 2012


On Tue, Dec 4, 2012 at 2:55 PM, Suvayu Ali <fatkasuvayu+linux at gmail.com> wrote:

> I agree with you that pdftk is excellent for manipulating pdfs, but why
> do you say "ImageMagick is rarely the right option anyway"?  I use it
> all the time to manipulate images (jpg, png, etc); it seems to work
> quite well.  Please do not take my query the wrong way, I'm just curious
> what you think ImageMagick lacks.

As with everything, there are pros and cons to each approach.
ImageMagick tries to do everything, which results in an ever
increasing complexity of invocation. Further, if it doesn't do what
you want, there's very little you can do about it. Compare that with
netpbm, which is just a traditional Unix pipeline. If it doesn't do
what you want, you can always add an extra transformation in the
middle of the pipeline. Netpbm will often give better quality output
(for example, correct gamma scaling). Somewhat counter intuitively,
netpbm turns out to be faster than ImageMagick for many operations,
too, despite having to create more processes and pipe data between
them. That said, ImageMagick provides some niceties like -gravity.
Sure, you can do it with netpbm, but it requires a script to calculate
the correct offsets, where ImageMagick provides the functionality out
of the box.

Tet

-- 
"Java is a DSL for taking large XML files and converting them to stack
traces" -- Bulat Shakirzyanov


More information about the users mailing list