diff --git a/ChangeLog b/ChangeLog index 72324badcb..fda5540f93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-09 Michael Natterer + + * app/tools/gimplevelstool.c (gimp_levels_tool_map): fix alpha + handling on greyscale images. + 2008-01-09 Sven Neumann * plug-ins/common/convmatrix.c (convolve_image): round the result diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c index 18010c313a..de71e22e78 100644 --- a/app/tools/gimplevelstool.c +++ b/app/tools/gimplevelstool.c @@ -280,9 +280,15 @@ gimp_levels_tool_map (GimpImageMapTool *image_map_tool) channel <= GIMP_HISTOGRAM_ALPHA; channel++) { - gegl_node_set (image_map_tool->operation, - "channel", channel, - NULL); + /* FIXME: hack */ + if (! tool->color && channel == 1) + gegl_node_set (image_map_tool->operation, + "channel", GIMP_HISTOGRAM_ALPHA, + NULL); + else + gegl_node_set (image_map_tool->operation, + "channel", channel, + NULL); gegl_node_set (image_map_tool->operation, "gamma", levels->gamma[channel], @@ -291,6 +297,10 @@ gimp_levels_tool_map (GimpImageMapTool *image_map_tool) "low-output", levels->low_output[channel] / 255.0, "high-output", levels->high_output[channel] / 255.0, NULL); + + /* FIXME: hack */ + if (! tool->color && channel == 1) + break; } }