mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +03:00
unroll ImagingPackRGB
This commit is contained in:
parent
b4e226714d
commit
762b09cdb5
|
@ -227,13 +227,17 @@ packLAL(UINT8* out, const UINT8* in, int pixels)
|
||||||
void
|
void
|
||||||
ImagingPackRGB(UINT8* out, const UINT8* in, int pixels)
|
ImagingPackRGB(UINT8* out, const UINT8* in, int pixels)
|
||||||
{
|
{
|
||||||
int i;
|
int i = 0;
|
||||||
/* RGB triplets */
|
/* RGB triplets */
|
||||||
for (i = 0; i < pixels; i++) {
|
for (; i < pixels-1; i++) {
|
||||||
out[0] = in[R];
|
((UINT32*)out)[0] = ((UINT32*)in)[i];
|
||||||
out[1] = in[G];
|
out += 3;
|
||||||
out[2] = in[B];
|
}
|
||||||
out += 3; in += 4;
|
for (; i < pixels; i++) {
|
||||||
|
out[0] = in[i*4+R];
|
||||||
|
out[1] = in[i*4+G];
|
||||||
|
out[2] = in[i*4+B];
|
||||||
|
out += 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user