mirror of https://github.com/GNOME/gimp.git
Bill Skaggs <weskaggs@primate.ucdavis.edu>
* plug-ins/common/decompose.c: clamp results of LAB decomposition so that out-of-gamut conversions do not overflow and get badly distorted. Fixes bug #147603. Note that it would probably be a good idea to do similar things for other conversion types.
This commit is contained in:
parent
5658cb1a56
commit
2a803755fd
|
@ -1,3 +1,10 @@
|
|||
2004-07-25 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* plug-ins/common/decompose.c: clamp results of LAB decomposition
|
||||
so that out-of-gamut conversions do not overflow and get
|
||||
badly distorted. Fixes bug #147603. Note that it would probably
|
||||
be a good idea to do similar things for other conversion types.
|
||||
|
||||
2004-07-25 Shlomi Fish <shlomif@iglu.org.il>
|
||||
|
||||
* plug-ins/gimpressionist/: converted checks for initialization of
|
||||
|
|
|
@ -1043,9 +1043,9 @@ extract_lab (guchar *src,
|
|||
ftx = ((tx = x/Xn) > 0.008856) ? cbrt (tx) : 7.78 * tx + sixteenth;
|
||||
ftz = ((tz = z/Zn) > 0.008856) ? cbrt (tz) : 7.78 * tz + sixteenth;
|
||||
|
||||
*l_dst++ = (guchar) (l * 2.5599);
|
||||
*a_dst++ = (guchar) (128.0 + (ftx - fty) * 635 );
|
||||
*b_dst++ = (guchar) (128.0 + (fty - ftz) * 254 );
|
||||
*l_dst++ = (guchar) CLAMP (l * 2.5599, 0., 256.);
|
||||
*a_dst++ = (guchar) CLAMP (128.0 + (ftx - fty) * 635, 0., 256.);
|
||||
*b_dst++ = (guchar) CLAMP (128.0 + (fty - ftz) * 254, 0., 256.);
|
||||
|
||||
rgb_src += offset;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue