diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c index 13b82dc681..cffe5c435b 100644 --- a/app/core/gimpdrawable.c +++ b/app/core/gimpdrawable.c @@ -742,8 +742,10 @@ gimp_drawable_get_pixel_at (GimpPickable *pickable, y < 0 || y >= gimp_item_get_height (GIMP_ITEM (drawable))) return FALSE; - tile_manager_read_pixel_data_1 (gimp_drawable_get_tiles (drawable), x, y, - pixel); + gegl_buffer_sample (gimp_drawable_get_read_buffer (drawable), + x, y, NULL, pixel, + gimp_drawable_get_format (drawable), + GEGL_SAMPLER_NEAREST); return TRUE; } diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c index 0db5b20b5d..1f4bb35beb 100644 --- a/app/core/gimpprojection.c +++ b/app/core/gimpprojection.c @@ -376,15 +376,17 @@ gimp_projection_get_pixel_at (GimpPickable *pickable, gint y, guchar *pixel) { - TileManager *tiles = gimp_projection_get_tiles (pickable); + GeglBuffer *buffer = gimp_projection_get_buffer (pickable); - if (x < 0 || - y < 0 || - x >= tile_manager_width (tiles) || - y >= tile_manager_height (tiles)) + if (x < 0 || + y < 0 || + x >= gegl_buffer_get_width (buffer) || + y >= gegl_buffer_get_height (buffer)) return FALSE; - tile_manager_read_pixel_data_1 (tiles, x, y, pixel); + gegl_buffer_sample (buffer, x, y, NULL, pixel, + gimp_projection_get_format (pickable), + GEGL_SAMPLER_NEAREST); return TRUE; }