[cairo] Better quality downsampling in cairo/pixman
Alexander Shulgin
alex.shulgin at gmail.com
Sat Jun 26 22:20:47 PDT 2010
Hi all,
I don't really like to beat the dead horse, but here it goes... :)
The other day I was using Alt+TAB to switch between windows in my
brand new Ubuntu desktop and was unpleasantly surprised how window
thumbnails quality was in striking contrast with the overall eye-candy
of the desktop (other effects seem to use OpenGL).
Not sure if cairo is the case here, but the simple test I made shows
that the best filter it have in the toolbox is bilinear
(cairo-best.png). Gimp beats cairo with it's left hand, when it comes
to downsampling (see gimp-cubic.png). And even gimp-linear.png seems
to be much better than cairo's best attempt!
I'm willing to take my time improving cairo's downsampling
capabilities, if experienced people out there are willing to help me
by answering my naive questions and pointing in the right direction.
:)
So my current questions are:
1) How hard would it be to add new cairo (or does it belong to
pixman?) filter, say bicubic interpolation?
2) How comes Gimp's linear is much like cubic? Does it seem to do
something more than just bilinear interpolation?
3) I know from past experience that even bicubic can be faulty when it
comes to downsampling by a factor of over 1/4. I have solved this
issue by using Lanczos (SinC) filter once. Should we consider using
this filter too?
That's all for now.
All the best!
--
Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-resampling-test.c
Type: text/x-csrc
Size: 839 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100627/fd8c8ee9/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: src.png
Type: image/png
Size: 88645 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100627/fd8c8ee9/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-best.png
Type: image/png
Size: 8949 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100627/fd8c8ee9/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gimp-cubic.png
Type: image/png
Size: 13248 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100627/fd8c8ee9/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gimp-linear.png
Type: image/png
Size: 10764 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100627/fd8c8ee9/attachment-0007.png>
More information about the cairo
mailing list