Switch VIPS_FCLIP to VIPS_CLIP in vips_scRGB2{BW,sRGB}

This commit is contained in:
Kleis Auke Wolthuizen 2020-12-29 13:01:54 +01:00
parent 0982d0efbb
commit 7cda6e5957
2 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ vips_scRGB2BW_line_16( unsigned short * restrict q, float * restrict p,
q += 1;
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;
q += extra_bands;
}

View File

@ -140,7 +140,7 @@ vips_scRGB2sRGB_line_16( unsigned short * restrict q, float * restrict p,
q += 3;
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;
q += extra_bands;
}