mirror of https://github.com/GNOME/gimp.git
fix NaN issue in gimpoperationlevels.c
This commit is contained in:
parent
bd3f892f79
commit
8482fb9cf6
|
@ -86,6 +86,9 @@ gimp_operation_levels_map (gdouble value,
|
|||
gdouble low_output,
|
||||
gdouble high_output)
|
||||
{
|
||||
/* clamp to guard pow() against negative input */
|
||||
value = MAX (value, low_input);
|
||||
|
||||
/* determine input intensity */
|
||||
if (high_input != low_input)
|
||||
value = (value - low_input) / (high_input - low_input);
|
||||
|
|
Loading…
Reference in New Issue