Feature request : improve the resizing algorithm

Bug #393797 reported by Steve Dodier-Lazaro
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
notify-osd (Ubuntu)
Fix Released
Wishlist
Mirco Müller

Bug Description

The current album art notifications are blurry, not because they are resized by the applications, but because the resizing algorithm used by Notify OSD makes them blurry. According to Mpt, the algorithm currently used is Sinc/Lanczos.

I attached a picture showing some photos with the different algorithms available in GIMP, as follows :
 _________________________________________________________________________________________
| No interpolation | Linear | Cubic .. | Lanczos ............... | Lanczos + sharp 5/.5/0 |
| No interpolation | Linear | Cubic .. | Lanczos ............... | Lanczos + sharp 5/.5/0 |
| No interpolation | Linear | Cubic .. | Lanczos ............... | Lanczos + sharp 5/.5/0 |
| ................ | Cubic | Lanczos | Lanczos + sharp 1/.1/0 | Lanczos + sharp 5/.5/0 |
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

All the photos were 900x900 PNG except the monkey which was 64x64.

Apparently, the best result without sharpening is the Cubic algorithm. If you want to sharpen the pictures, then the intensity of the sharpen algorithm should depend on how big the original image was (sharpen a lot big images, and a little little images).

I also attached a tarball containing the original and cut images, and a script to show them in bubbles.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :
description: updated
Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :
description: updated
description: updated
Revision history for this message
Mirco Müller (macslow) wrote :

In current upstream notify-osd the GDK_INTERP_BILINEAR filter is used for rescaling images. Here is the relevant excerpt from the GdkPixbuf API-reference describing this interpolation filter:

"...
GDK_INTERP_BILINEAR

Best quality/speed balance; use this mode by default. Bilinear interpolation. For enlargement, it is equivalent to point-sampling the ideal bilinear-interpolated image. For reduction, it is equivalent to laying down small tiles and integrating over the coverage area.
..."

Implementing a custom filtering mechanism (apart from what GdkPixbuf offers) inside notify-osd is a bit too much to ask for in the current (karmic) cycle. But patches are always welcome of course :)

Revision history for this message
Mirco Müller (macslow) wrote :

For comparison I did the the same bunch of test-notifications (from test.sh) with the current notify-osd trunk (rev 341). The column of images I added on the far left, is notify-osd's current rendering (of all three 900x900 source-images and the one 64x64 source-image) using the GDK_INTERP_BILINEAR interpolation filter. It is clear to see, that this solution is providing the sharpest result without any nasty aliasing. I regard this feature request therefore as implemented, because the left-most images look crisper than the others in each row.

Changed in notify-osd:
assignee: nobody → Mirco Müller (macslow)
importance: Undecided → Wishlist
status: New → Fix Committed
Neil J. Patel (njpatel)
Changed in notify-osd:
status: Fix Committed → Fix Released
affects: notify-osd → notify-osd (Ubuntu)
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.