mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
core: Fix linear conversion for Sample Average picks
In gimp_pickable_pick_color (), we get RGBA values using the pickable's babl format, but then create a linear format to convert it when Sample Average is enabled. As a result, non-linear encodings are always converted to linear, and the displayed pixel values are shown incorrectly in the color frame. This patch removes the code that changes the pickable's format to RaGaBaA double, since gimp_gegl_average_color () already does this and handles the conversion to and from the original pickable format.
This commit is contained in:
@@ -314,9 +314,6 @@ gimp_pickable_pick_color (GimpPickable *pickable,
|
||||
{
|
||||
gint radius = floor (average_radius);
|
||||
|
||||
format = babl_format_with_space ("RaGaBaA double",
|
||||
babl_format_get_space (format));
|
||||
|
||||
gimp_pickable_get_pixel_average (pickable,
|
||||
GEGL_RECTANGLE (x - radius,
|
||||
y - radius,
|
||||
|
Reference in New Issue
Block a user