GNOME Bugzilla – Bug 645810
gegl_buffer_sample should work when used with gegl_buffer_n
Last modified: 2012-04-02 16:30:50 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);
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.
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.