Merge pull request #8008 from radarhere/convert

Simplified RGB to I;16, I;16L and I;16B conversion
This commit is contained in:
Hugo van Kemenade 2024-04-25 00:00:15 +03:00 committed by GitHub
commit 1fc1179ed5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -254,9 +254,8 @@ static void
rgb2i16l(UINT8 *out_, const UINT8 *in, int xsize) {
int x;
for (x = 0; x < xsize; x++, in += 4) {
UINT8 v = CLIP16(L24(in) >> 16);
*out_++ = v;
*out_++ = v >> 8;
*out_++ = L24(in) >> 16;
*out_++ = 0;
}
}
@ -264,9 +263,8 @@ static void
rgb2i16b(UINT8 *out_, const UINT8 *in, int xsize) {
int x;
for (x = 0; x < xsize; x++, in += 4) {
UINT8 v = CLIP16(L24(in) >> 16);
*out_++ = v >> 8;
*out_++ = v;
*out_++ = 0;
*out_++ = L24(in) >> 16;
}
}