fix alpha handling on greyscale images.
2008-01-09 Michael Natterer <mitch@gimp.org> * app/tools/gimplevelstool.c (gimp_levels_tool_map): fix alpha handling on greyscale images. svn path=/trunk/; revision=24577
This commit is contained in:

committed by
Michael Natterer

parent
c7b188b90b
commit
c9af6ea8d3
@ -1,3 +1,8 @@
|
|||||||
|
2008-01-09 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/tools/gimplevelstool.c (gimp_levels_tool_map): fix alpha
|
||||||
|
handling on greyscale images.
|
||||||
|
|
||||||
2008-01-09 Sven Neumann <sven@gimp.org>
|
2008-01-09 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/common/convmatrix.c (convolve_image): round the result
|
* plug-ins/common/convmatrix.c (convolve_image): round the result
|
||||||
|
@ -280,9 +280,15 @@ gimp_levels_tool_map (GimpImageMapTool *image_map_tool)
|
|||||||
channel <= GIMP_HISTOGRAM_ALPHA;
|
channel <= GIMP_HISTOGRAM_ALPHA;
|
||||||
channel++)
|
channel++)
|
||||||
{
|
{
|
||||||
gegl_node_set (image_map_tool->operation,
|
/* FIXME: hack */
|
||||||
"channel", channel,
|
if (! tool->color && channel == 1)
|
||||||
NULL);
|
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,
|
gegl_node_set (image_map_tool->operation,
|
||||||
"gamma", levels->gamma[channel],
|
"gamma", levels->gamma[channel],
|
||||||
@ -291,6 +297,10 @@ gimp_levels_tool_map (GimpImageMapTool *image_map_tool)
|
|||||||
"low-output", levels->low_output[channel] / 255.0,
|
"low-output", levels->low_output[channel] / 255.0,
|
||||||
"high-output", levels->high_output[channel] / 255.0,
|
"high-output", levels->high_output[channel] / 255.0,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
/* FIXME: hack */
|
||||||
|
if (! tool->color && channel == 1)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user