From 8c60753db6b44fe99de849a4893955e92d97c340 Mon Sep 17 00:00:00 2001 From: Jon Burgess Date: Sat, 13 Jun 2009 18:27:44 +0000 Subject: [PATCH] Fix reduce_4() to make it consistent with reduce_8(). This was breaking tiles which were compressing down to a 16 entry colormap. All the pixels were being set to the alpha index. --- include/mapnik/png_io.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mapnik/png_io.hpp b/include/mapnik/png_io.hpp index 6701fd28c..16bf69049 100644 --- a/include/mapnik/png_io.hpp +++ b/include/mapnik/png_io.hpp @@ -126,7 +126,7 @@ namespace mapnik { mapnik::rgb c((val)&0xff, (val>>8)&0xff, (val>>16) & 0xff); byte index = tree.quantize(c); if (x%2 > 0) index = index<<4; - if ((val>>24)^0x80) index = 0;//alfa + if (!((val>>24)&0x80)) index = 0;//alfa row_out[x>>1] |= index; } }