Switch VIPS_FCLIP to VIPS_CLIP in vips_scRGB2{BW,sRGB}
This commit is contained in:
parent
0982d0efbb
commit
7cda6e5957
@ -113,7 +113,7 @@ vips_scRGB2BW_line_16( unsigned short * restrict q, float * restrict p,
|
|||||||
q += 1;
|
q += 1;
|
||||||
|
|
||||||
for( j = 0; j < extra_bands; j++ )
|
for( j = 0; j < extra_bands; j++ )
|
||||||
q[j] = VIPS_FCLIP( 0, p[j] * 256.0, USHRT_MAX );
|
q[j] = VIPS_CLIP( 0, (int) (p[j] * 256.0), USHRT_MAX );
|
||||||
p += extra_bands;
|
p += extra_bands;
|
||||||
q += extra_bands;
|
q += extra_bands;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ vips_scRGB2sRGB_line_16( unsigned short * restrict q, float * restrict p,
|
|||||||
q += 3;
|
q += 3;
|
||||||
|
|
||||||
for( j = 0; j < extra_bands; j++ )
|
for( j = 0; j < extra_bands; j++ )
|
||||||
q[j] = VIPS_FCLIP( 0, p[j] * 256.0, USHRT_MAX );
|
q[j] = VIPS_CLIP( 0, (int) (p[j] * 256.0), USHRT_MAX );
|
||||||
p += extra_bands;
|
p += extra_bands;
|
||||||
q += extra_bands;
|
q += extra_bands;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user