mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-07 02:44:14 +03:00
≈20% faster, 2 times more precisely (0.17% difference against 0.37%)
This commit is contained in:
parent
af96b5d4b2
commit
a83ef0f0ed
|
@ -74,7 +74,7 @@ ImagingAlphaComposite(Imaging imDst, Imaging imSrc)
|
|||
// There we use 7 bits for precision.
|
||||
// We could use more, but we go beyond 32 bits.
|
||||
UINT16 coef1 = src->a * 255 * 255 * 128 / outa255;
|
||||
UINT16 coef2 = blend * 255 * 128 / outa255;
|
||||
UINT16 coef2 = 255 * 128 - coef1;
|
||||
|
||||
#define SHIFTFORDIV255(a)\
|
||||
((a >> 8) + a >> 8)
|
||||
|
|
Loading…
Reference in New Issue
Block a user