diff options
author | Carl Worth <cworth@cworth.org> | 2006-02-13 16:47:01 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2006-02-13 16:47:01 -0800 |
commit | 6c38e238e5daab5df4c11027d28e48e62bbd4bc8 (patch) | |
tree | 150fc4b07ca1b92e8439bb722fde8bf63db7d009 /test/read_png.c | |
parent | 0b5ac24b1522b3287903c04fb894bfae4fc67403 (diff) | |
parent | 980eff38e494223de00e7ded706f6beaca27fce1 (diff) |
Remove pixman from SNAPSHOT_0_4_0SNAPSHOT_0_4_0
Diffstat (limited to 'test/read_png.c')
-rw-r--r-- | test/read_png.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/read_png.c b/test/read_png.c index 23f91e831..e7e2a92ca 100644 --- a/test/read_png.c +++ b/test/read_png.c @@ -47,9 +47,9 @@ premultiply_data (png_structp png, unsigned char alpha = base[3]; unsigned long p; - red = (unsigned) red * (unsigned) alpha / 255; - green = (unsigned) green * (unsigned) alpha / 255; - blue = (unsigned) blue * (unsigned) alpha / 255; + red = ((unsigned) red * (unsigned) alpha + 127) / 255; + green = ((unsigned) green * (unsigned) alpha + 127) / 255; + blue = ((unsigned) blue * (unsigned) alpha + 127) / 255; p = (alpha << 24) | (red << 16) | (green << 8) | (blue << 0); memcpy (base, &p, sizeof (unsigned long)); } |