mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-15 01:34:45 +03:00
fix rgb2la() for LA pixelsize change (4 -> 2)
This commit is contained in:
parent
567b4798fd
commit
8ae262e977
|
@ -265,10 +265,10 @@ rgb2l(UINT8 *out, const UINT8 *in, int xsize) {
|
||||||
static void
|
static void
|
||||||
rgb2la(UINT8 *out, const UINT8 *in, int xsize) {
|
rgb2la(UINT8 *out, const UINT8 *in, int xsize) {
|
||||||
int x;
|
int x;
|
||||||
for (x = 0; x < xsize; x++, in += 4, out += 4) {
|
for (x = 0; x < xsize; x++, in += 4, out += 2) {
|
||||||
/* ITU-R Recommendation 601-2 (assuming nonlinear RGB) */
|
/* ITU-R Recommendation 601-2 (assuming nonlinear RGB) */
|
||||||
out[0] = out[1] = out[2] = L24(in) >> 16;
|
out[0] = L24(in) >> 16;
|
||||||
out[3] = 255;
|
out[1] = 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user