From f409f912501a4cef6d0649b63c54e7b2689c81eb Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 31 Dec 2009 15:43:05 +0000 Subject: [PATCH] apply patch from marcin to fix problem with occaisionaly garbled/striped png256 output along shape edges - closes #416,#445,#447, improves upon #202 --- include/mapnik/png_io.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mapnik/png_io.hpp b/include/mapnik/png_io.hpp index e050f747b..5e9197dca 100644 --- a/include/mapnik/png_io.hpp +++ b/include/mapnik/png_io.hpp @@ -134,12 +134,12 @@ namespace mapnik { #ifdef MAPNIK_BIG_ENDIAN mapnik::rgb c((val>>24)&0xff, (val>>16)&0xff, (val>>8) & 0xff); byte index = tree.quantize(c); - if (x%2 > 0) index = index<<4; + if (x%2 == 0) index = index<<4; if (!(val&0x80)) index = 0;//alfa #else mapnik::rgb c((val)&0xff, (val>>8)&0xff, (val>>16) & 0xff); byte index = tree.quantize(c); - if (x%2 > 0) index = index<<4; + if (x%2 == 0) index = index<<4; if (!((val>>24)&0x80)) index = 0;//alfa #endif row_out[x>>1] |= index;