[Eug-lug] batch convert

T. Joseph CARTER knghtbrd at bluecherry.net
Mon Aug 23 00:55:53 PDT 2004


On Sun, Aug 22, 2004 at 09:14:09PM -0700, Bob Miller wrote:
> FWIW, I rescaled some images last night and today.  I did it the same
> way I've been doing it for the last 10+ years using pbmplus.
> 
>     $ jpegtopnm input.jpg | pnmscale -xsize=512 | ppmtojpeg > output.jpg
>     jpegtopnm: WRITING PPM FILE
>     pnmscale: Scaling by 0.320000 horizontally to 512 columns.
>     pnmscale: Scaling by 0.320000 vertically to 384 rows.
>     pnmscale: 0.000011 of right column stretched due to arithmetic imprecision
>     pnmscale: 0.000009 of bottom row stretched due to arithmetic imprecision
> 
> You can obviously embed that line in scripts in myriad ways.

Sure, but imagemagick supports far more image formats.  Using convert and
mogrify, you can get basically the same results.  And although I haven't
tried, I'm pretty sure that I'd have a lot more control over scale filters
using mogrify.  I mean, there's more to image scaling than bilinear and
trilinear these days.



More information about the EUGLUG mailing list