Wrong clipping when using the new v2 and v4 profiles, fixes #5142
This commit is contained in:
@@ -143,9 +143,6 @@ void Imagefloat::getScanline (int row, unsigned char* buffer, int bps, bool isFl
|
||||
float ri = r(row, i);
|
||||
float gi = g(row, i);
|
||||
float bi = b(row, i);
|
||||
if (ri > 65535.f || gi > 65535.f || bi > 65535.f) {
|
||||
filmlike_clip(&ri, &gi, &bi);
|
||||
}
|
||||
if (bps == 16) {
|
||||
sbuffer[ix++] = CLIP(ri);
|
||||
sbuffer[ix++] = CLIP(gi);
|
||||
|
@@ -41,9 +41,6 @@ inline void copyAndClampLine(const float *src, unsigned char *dst, const int W)
|
||||
float r = src[iy] * MAXVALF;
|
||||
float g = src[iy+1] * MAXVALF;
|
||||
float b = src[iy+2] * MAXVALF;
|
||||
if (r > MAXVALF || g > MAXVALF || b > MAXVALF) {
|
||||
filmlike_clip(&r, &g, &b);
|
||||
}
|
||||
dst[iy] = uint16ToUint8Rounded(CLIP(r));
|
||||
dst[iy+1] = uint16ToUint8Rounded(CLIP(g));
|
||||
dst[iy+2] = uint16ToUint8Rounded(CLIP(b));
|
||||
@@ -73,10 +70,6 @@ inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double r
|
||||
Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_ );
|
||||
Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyz);
|
||||
|
||||
if (R > MAXVALF || G > MAXVALF || B > MAXVALF) {
|
||||
filmlike_clip(&R, &G, &B);
|
||||
}
|
||||
|
||||
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[R]);
|
||||
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[G]);
|
||||
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[B]);
|
||||
|
Reference in New Issue
Block a user