Merge pull request #1947 from kleisauke/clip-scrgb
Switch VIPS_FCLIP to VIPS_CLIP in vips_scRGB2{BW,sRGB}
This commit is contained in:
commit
7a33be716b
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user