[Image-SIG] Resizing images

Matthew Nuzum newz at bearfruit.org
Thu Feb 22 15:58:33 CET 2007


On 2/20/07, Chris MacKenzie <chris at sunnyneuk.com> wrote:
> I am doing a vast amount of work in photoshop cs2 and then resizing images
> into multiple sizes for email, web publication, printing out on A3, A4
> etc,etc. To date I have been using PhotoShop actions which is a real pain.

> My Question is will resizing in PIL reduce the image quality compared to CS2
> or will it remain the same as the CS2 output.

I'm not a hard-core pil dev/user, but I've been in the same boat as
you, so here's my thoughts:

With Photoshop you'll be working from high-res, lossless files (PSDs).
If you were to save them out as a high-res jpg and then resize that
into smaller files with PIL, you'd definitely loose some quality,
since PIL's source material (JPGs) will be of lower quality.

If you give PIL a non-lossless format, like 24/32b PNGs and you resize
to even multiples of the source image's size (for example, 800x600 -->
400x300 --> 200x150 --> 100x75) I suspect you'd get pretty similar
results.

Where Photoshop shines, in my experience, is:
 * resizing to non-even multiple of source image's size (800x600 --> 90x68)
 * using masks to define different compression ratios for different
parts of the image
 * choosing the best compression ratio to match your desired output size/quality

This is just a guess though. Since Photoshop is a proprietary program,
no one outside Adobe can be confident about what goes on inside its
"save optimized" code. Maybe PIL can do better!

Also, different types of photos may be affected differently by the
various programs. Line-art may look rotten and photos may look superb.
You could batch them and then fix up anything that doesn't look good
enough.

By the way, I'm surprised you felt using actions a pain... don't you
just drop a folder of images onto your action's "droplet" .exe file? I
don't use cs2, so maybe they've taken droplets out.
-- 
Matthew Nuzum
www.bearfruit.org
newz2000 on freenode


More information about the Image-SIG mailing list