Improving quality of image scaling

Bug #100822 reported by Jan-Wijbrand Kolman
14
Affects Status Importance Assigned to Milestone
Silva
Fix Released
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?

Tags: silva-future
Revision history for this message
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.

Revision history for this message
Christian Zagrodnick (zagy) wrote :

Still waiting for test image.

Revision history for this message
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.

Revision history for this message
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.. :)

Revision history for this message
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 :)

Revision history for this message
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.

Revision history for this message
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)

Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.