mirror of https://github.com/GNOME/gimp.git
Issue #6994: Color Noise produces artifacts with highly saturated…
… source colors
Reviewer's (Jehan) note: a git blame shows this is a clear bug
introduced in commit 9d19bf2a3e
, which was a cleanup patch, and the
BOUNDS() macro was not doing exactly the same thing as the code before
the change.
This commit is contained in:
parent
681d8e7454
commit
3b3f34cd22
|
@ -1035,7 +1035,7 @@ repaint (ppm_t *p, ppm_t *a)
|
|||
if (runningvals.color_noise > 0.0)
|
||||
{
|
||||
double v = runningvals.color_noise;
|
||||
#define BOUNDS(a) (((a) < 0) ? (a) : ((a) > 255) ? 255 : (a))
|
||||
#define BOUNDS(a) (((a) < 0) ? (0) : ((a) > 255) ? 255 : (a))
|
||||
#define MYASSIGN(a) \
|
||||
{ \
|
||||
a = a + g_rand_double_range (random_generator, -v/2.0, v/2.0); \
|
||||
|
|
Loading…
Reference in New Issue