mirror of https://github.com/GNOME/gimp.git
Bug 758597 - gimp-drawable-get-pixel fails, assertion error in BABL
The code that actually allocates the returned pixel got lost when porting this to GEGL.
This commit is contained in:
parent
a69b68de40
commit
b3239f58df
|
@ -624,6 +624,9 @@ drawable_get_pixel_invoker (GimpProcedure *procedure,
|
|||
if (x_coord < gimp_item_get_width (GIMP_ITEM (drawable)) &&
|
||||
y_coord < gimp_item_get_height (GIMP_ITEM (drawable)))
|
||||
{
|
||||
num_channels = babl_format_get_bytes_per_pixel (format);
|
||||
pixel = g_new0 (guint8, num_channels);
|
||||
|
||||
gegl_buffer_sample (gimp_drawable_get_buffer (drawable),
|
||||
x_coord, y_coord, NULL, pixel, format,
|
||||
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
|
||||
|
|
|
@ -635,6 +635,9 @@ HELP
|
|||
if (x_coord < gimp_item_get_width (GIMP_ITEM (drawable)) &&
|
||||
y_coord < gimp_item_get_height (GIMP_ITEM (drawable)))
|
||||
{
|
||||
num_channels = babl_format_get_bytes_per_pixel (format);
|
||||
pixel = g_new0 (guint8, num_channels);
|
||||
|
||||
gegl_buffer_sample (gimp_drawable_get_buffer (drawable),
|
||||
x_coord, y_coord, NULL, pixel, format,
|
||||
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
|
||||
|
|
Loading…
Reference in New Issue