After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 80923 - HYPER is not correctly implemented
HYPER is not correctly implemented
Status: RESOLVED OBSOLETE
Product: gdk-pixbuf
Classification: Platform
Component: pixops
git master
Other other
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2002-05-06 11:15 UTC by Matthias Clasen
Modified: 2018-05-22 13:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The SVG file used for the rendering (18.71 KB, image/svg+xml)
2005-10-04 23:02 UTC, Philip Langdale
Details
Screenshot comparing the rendering. (35.79 KB, image/png)
2005-10-04 23:07 UTC, Philip Langdale
Details

Description Matthias Clasen 2002-05-06 11:15:25 UTC
From gdk-pixbuf/pixops/README:

* ART_FILTER_HYPER is not correctly implemented. It 
is currently
  implemented as a filter that is derived by doing linear interpolation
  on 
the source image and then averaging that with a box filter.

  It should be defined as 
followed (see art_filterlevel.h)

   "HYPER is the highest quality reconstruction 
function. It is derived
    from the hyperbolic filters in Wolberg's "Digital Image 
Warping,"
    and is formally defined as the hyperbolic-filter sampling the ideal
    
hyperbolic-filter interpolated image (the filter is designed to be
    idempotent for 1:1 
pixel mapping). It is the slowest and highest
    quality."

  The current HYPER is 
probably as slow, but lower quality. Also, there
  are some subtle errors in the 
calculation current HYPER that show up as dark
  stripes if you scale a constant-color 
image.
Comment 1 Philip Langdale 2005-10-04 23:00:21 UTC
Not only that, but the current hyper implementation is infact *not* idempotent
for the 1:1 case - at least in the context of a gdk_pixbuf_composite operation.

This came to our attention because the latest release of libgnomecanvas switched
from BILINEAR to HYPER resulting in lower quality rendering of our svg pixbufs
which we manually scale (by re-rendering with librsvg) to the required size on
zoom actions.

So we know that gnome canvas is always doing a 1:1 scaling when compositing them
(and I added debug output to verify this).

I will attach screenshots and the actual svg file, and I will file a separate
bug against gnomecanvas suggesting a switch back to BILINEAR until HYPER is fixed.
Comment 2 Philip Langdale 2005-10-04 23:02:41 UTC
Created attachment 53036 [details]
The SVG file used for the rendering
Comment 3 Philip Langdale 2005-10-04 23:07:55 UTC
Created attachment 53037 [details]
Screenshot comparing the rendering.

BILINEAR is on the left and HYPER is on the right.

We observe that a) they aren't the same but they ought to be, and b) the
BILINEAR one is crisper and clearer.
Comment 4 Owen Taylor 2005-10-05 13:37:17 UTC
If that's true, LART whoever made the gnome-canvas change. HYPER should
not be used.
Comment 5 Philip Langdale 2005-10-05 18:27:07 UTC
Indeed. I have reopened bug 129891 accordingly. It requested that "better
interpolation be used". Clearly, this has not been satisfied yet :-)

For completeness' sake, they actually used NEAREST before HYPER but BILINEAR and
NEAREST look identical for 1:1.
Comment 6 Emmanuele Bassi (:ebassi) 2018-04-28 09:44:17 UTC
We should really deprecate HYPER, then. The thumbnailer code uses it, and it shouldn't.
Comment 7 Bastien Nocera 2018-04-28 16:23:18 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #6)
> We should really deprecate HYPER, then. The thumbnailer code uses it, and it
> shouldn't.

The poor person that implemented the thumbnailer went by the API documentation rather than the bugs filed. Removing it would have been a nice thing to do in 2010 when gdk-pixbuf was split off. Now, where's my time machine?
Comment 8 GNOME Infrastructure Team 2018-05-22 13:01:30 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues/3.