apply patch from marcin to fix problem with occaisionaly garbled/striped png256 output along shape edges - closes #416,#445,#447, improves upon #202

This commit is contained in:
Dane Springmeyer 2009-12-31 15:43:05 +00:00
parent cabdd341cd
commit f409f91250

View file

@ -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;