mirror of https://github.com/GNOME/gimp.git
app: must CLAMP() all valus to 0..1 for calculating histogram bins
The histogram does only 0..1, there are no bins outside that range.
This commit is contained in:
parent
d26cd268ba
commit
0f0590426d
|
@ -307,7 +307,9 @@ gimp_histogram_calculate (GimpHistogram *histogram,
|
|||
babl_format ("Y float"),
|
||||
GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
|
||||
|
||||
#define VALUE(c,i) (priv->values[(c) * priv->n_bins + (gint) ((i) * (priv->n_bins - 0.0001))])
|
||||
#define VALUE(c,i) (priv->values[(c) * priv->n_bins + \
|
||||
(gint) (CLAMP ((i), 0.0, 1.0) * \
|
||||
(priv->n_bins - 0.0001))])
|
||||
|
||||
while (gegl_buffer_iterator_next (iter))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue