Skip to content

Commit

Permalink
Simplified code
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Apr 24, 2024
1 parent 2adeb7a commit 46b85e6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/libImaging/Convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,19 +254,17 @@ 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;
}
}

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;
}
}

Expand Down

0 comments on commit 46b85e6

Please sign in to comment.