summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5b910d2)
raw | patch | inline | side by side (parent: 5b910d2)
author | Jasper van de Gronde <jasper.vandegronde@gmail.com> | |
Tue, 20 Apr 2010 12:13:56 +0000 (14:13 +0200) | ||
committer | Jasper van de Gronde <jasper.vandegronde@gmail.com> | |
Tue, 20 Apr 2010 12:13:56 +0000 (14:13 +0200) |
src/libnr/nr-compose-transform.cpp | patch | blob | history |
index bc05c7b519d6feab284d1dedd87bf6da526982d5..e7c2865698f31ecef2c49387972e43238b573f2e 100644 (file)
r = (r + rounding_fix) >> dbits;
g = (g + rounding_fix) >> dbits;
b = (b + rounding_fix) >> dbits;
- if (a == 255) {
+ if (a == 255*255) {
/* Full coverage, demul src */
d[0] = NR_NORMALIZE_21(r);
d[1] = NR_NORMALIZE_21(g);
@@ -275,7 +275,7 @@ nr_R8G8B8A8_P_R8G8B8A8_P_R8G8B8A8_N_TRANSFORM_n (unsigned char *px, int w, int h
r = (r + rounding_fix) >> dbits;
g = (g + rounding_fix) >> dbits;
b = (b + rounding_fix) >> dbits;
- if ((a == 255) || (d[3] == 0)) {
+ if ((a == 255*255) || (d[3] == 0)) {
/* Transparent BG, premul src */
d[0] = NR_NORMALIZE_21(r);
d[1] = NR_NORMALIZE_21(g);