mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 02:36:17 +03:00
Simplified code
This commit is contained in:
parent
2adeb7a6c5
commit
46b85e6ab4
|
@ -254,9 +254,8 @@ static void
|
||||||
rgb2i16l(UINT8 *out_, const UINT8 *in, int xsize) {
|
rgb2i16l(UINT8 *out_, const UINT8 *in, int xsize) {
|
||||||
int x;
|
int x;
|
||||||
for (x = 0; x < xsize; x++, in += 4) {
|
for (x = 0; x < xsize; x++, in += 4) {
|
||||||
UINT8 v = CLIP16(L24(in) >> 16);
|
*out_++ = L24(in) >> 16;
|
||||||
*out_++ = v;
|
*out_++ = 0;
|
||||||
*out_++ = v >> 8;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,9 +263,8 @@ static void
|
||||||
rgb2i16b(UINT8 *out_, const UINT8 *in, int xsize) {
|
rgb2i16b(UINT8 *out_, const UINT8 *in, int xsize) {
|
||||||
int x;
|
int x;
|
||||||
for (x = 0; x < xsize; x++, in += 4) {
|
for (x = 0; x < xsize; x++, in += 4) {
|
||||||
UINT8 v = CLIP16(L24(in) >> 16);
|
*out_++ = 0;
|
||||||
*out_++ = v >> 8;
|
*out_++ = L24(in) >> 16;
|
||||||
*out_++ = v;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user