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 645810 - gegl_buffer_sample should work when used with gegl_buffer_n
gegl_buffer_sample should work when used with gegl_buffer_n
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: core
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2011-03-27 09:07 UTC by Michael Muré
Modified: 2012-04-02 16:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Muré 2011-03-27 09:07:56 UTC
Tested in the Gimp's cage tool.

The following is an example of code, and values saw while debugging.

/* return -48.9444809 - WRONG VALUE */
gegl_buffer_sample (coef_buf, coords.x, coords.y, 1.0, coef, format_coef, GEGL_INTERPOLATION_NEAREST);


/* return 0.100647807 - GOOD VALUE */
rect.height = 1;
rect.width  = 1;
rect.x      = coords.x;
rect.y      = coords.y;

gegl_buffer_get (coef_buf, 1, &rect, format_coef, coef, GEGL_AUTO_ROWSTRIDE);
Comment 1 Øyvind Kolås (pippin) 2011-04-26 00:42:43 UTC
Yep doesn't work since the sampling infrastucture converts pixels through RaGaBaA float. It would be nice to have sampling working also working as might be expected also for these data GeglBuffers.
Comment 2 Øyvind Kolås (pippin) 2012-04-02 16:30:50 UTC
Nearest neighbour interpolation now goes through a different fast path for gegl_buffer_sample, that disregards all interpolation and fetches bytes directly skipping any color conversions.

Closing the bug.