Update src/_imagingft.c

Co-authored-by: Ondrej Baranovič <nulano@nulano.eu>
This commit is contained in:
Zach Nagengast 2023-11-06 20:48:22 -08:00 committed by GitHub
parent e1aaec3fb1
commit b15b2d494c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1080,7 +1080,7 @@ font_render(FontObject *self, PyObject *args) {
int out_alpha = CLIP8(src_alpha + MULDIV255(target[k * 4 + 3], (255 - src_alpha), tmp)); int out_alpha = CLIP8(src_alpha + MULDIV255(target[k * 4 + 3], (255 - src_alpha), tmp));
target[k * 4 + 3] = out_alpha; target[k * 4 + 3] = out_alpha;
} else { } else {
/* paste source directly to BGRa */ /* paste unpremultiplied RGBA values */
target[k * 4 + 0] = src_blu; target[k * 4 + 0] = src_blu;
target[k * 4 + 1] = src_grn; target[k * 4 + 1] = src_grn;
target[k * 4 + 2] = src_red; target[k * 4 + 2] = src_red;