[Image-SIG] Problem when resizing large JPEG to thumbnail
tiit at sympatico.ca
Mon Sep 28 17:01:32 CEST 2009
On 09-09-28, at 07:22, Fredrik Lundh wrote:
> On Tue, Sep 1, 2009 at 4:44 AM, Etienne Desautels
> <tiit at sympatico.ca> wrote:
>> So after experimenting, I see 3 problems:
>> 1. Resize with ANTIALIAS from a large JPEG to a small thumbnail
>> give poor
>> image quality.
> This should work fine in 1.1.6; no time to look at your tests right
> now, but I'll do that asap.
Since I wrote this, I resize (downsample) a lot more images with PIL
and in general the result is excellent. The problem appear only with
the kind of images I choose to do my initial tests, image of
concentric circles or alike. Now I'm pretty sure that the poor result
I saw is a special edge case of the antialias algorithm used in PIL. I
can't see any other explanation.
>> 2. BICUBIC, when set, is not applied. Instead NEAREST is use.
> The problem you're seeing is that PIL's BICUBIC filter has a fixed
> size, and thus doesn't work well for large downsamplings (there's a
> discussion about this in the documentation, iirc). The ANTIALIAS
> filter does not have that shortcoming.
Ho, yes I see.
>> 3. Converting from TIFF CMYK to RGB shift the colors dramatically.
> This is a bug in 1.1.6 and earlier (well, strictly speaking, it's a
> old bug in Photoshop, but I guess we're not really in a position to
> make them change their implementation ;-). It's fixed in 1.1.7.
> There's also a drop-in replacement JPEG plugin by Kevin Cazabon that
> fixes this for earlier versions (in a somewhat roundabout way, due to
> a bug in the core library that has also been fixed in 1.1.7); see:
I saw some threads about this bug but I was with the impression that
applied only to the JPEG plugin, not to the CMYK support in general ?
More information about the Image-SIG