Improving quality of image scaling

Reported by Jan-Wijbrand Kolman on 2003-10-30
14
Affects Status Importance Assigned to Milestone
Silva
Wishlist
Unassigned

Bug Description

The current scaling algoritm used for scaling Silva images does not produce a
satisfactory quality. Can this be improved? Can PIL be told to use a different
algoritm?

Christian Zagrodnick (zagy) wrote :

Can you give me a test case? I don't see the rendering beeing unsatisfactory.
But this may be due to the kind of image or something.

Christian Zagrodnick (zagy) wrote :

Still waiting for test image.

Christian Zagrodnick (zagy) wrote :

Samuel Schluep provided the attached image.

Scaling this is not really possible without recognising the meaning of the
different parts. But as the image only consists of pixels, some pixels shrinked
away. Those lines are only one pixel wide in the original, so you cannot shrink
them, only remove them.

Martijn Faassen (faassen) wrote :

> Scaling this is not really possible without recognising the meaning of the
> different parts. But as the image only consists of pixels, some pixels shrinked
> away. Those lines are only one pixel wide in the original, so you cannot shrink
> them, only remove them.

Shrinking single pixel lines is indeed tricky. I imagine smart scaling
algorithms existed which have some heuristics for this. If you have a line
somewhere that's one pixel big, when shrinking it you typically never want a
high-contrast line to disappear. Then again, how well they work and whether the
library we use has such algorithms too is another question.. :)

Kit Blake (kitblake) wrote :

JW, this is to remind you to send that marina image for comparision
testing in Photoshop. (It has lots of wires and cables in a forest of
ship masts against blue sky, and severely taxes scaling algorythms :)

Christian Zagrodnick (zagy) wrote :

The question of course is whether we want to make the effort of finding such an
intelligent algorithm � or to be precise if a customer wants us to make the effort.

Martijn Faassen (faassen) wrote :

I don't think this one looks like reachable for 0.9.3. Can we move this on to
0.9.4? (if necessary backport to 0.9.3 later)

Christian Zagrodnick (zagy) wrote :

After all Silva is not an image manipulation programme :)

Actually in my eyes this is not even urgent, it's more a feture or wish to have
a rather intelligent scaling ...

pushing to 0.9.4

Changed in silva:
assignee: Christian Zagrodnick (zagy) → nobody
Sylvain Viollon (thefunny) wrote :

I think this have been fixed for years, and the resize uses the best algorithm there is to keep the quality. And nobody complained about it in years.

Changed in silva:
milestone: none → 2.2
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers