mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24: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
|
||||
ImagingPackRGB(UINT8* out, const UINT8* in, int pixels)
|
||||
{
|
||||
int i;
|
||||
int i = 0;
|
||||
/* RGB triplets */
|
||||
for (i = 0; i < pixels; i++) {
|
||||
out[0] = in[R];
|
||||
out[1] = in[G];
|
||||
out[2] = in[B];
|
||||
out += 3; in += 4;
|
||||
for (; i < pixels-1; i++) {
|
||||
((UINT32*)out)[0] = ((UINT32*)in)[i];
|
||||
out += 3;
|
||||
}
|
||||
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