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:
parent
cabdd341cd
commit
f409f91250
1 changed files with 2 additions and 2 deletions
|
@ -134,12 +134,12 @@ namespace mapnik {
|
||||||
#ifdef MAPNIK_BIG_ENDIAN
|
#ifdef MAPNIK_BIG_ENDIAN
|
||||||
mapnik::rgb c((val>>24)&0xff, (val>>16)&0xff, (val>>8) & 0xff);
|
mapnik::rgb c((val>>24)&0xff, (val>>16)&0xff, (val>>8) & 0xff);
|
||||||
byte index = tree.quantize(c);
|
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
|
if (!(val&0x80)) index = 0;//alfa
|
||||||
#else
|
#else
|
||||||
mapnik::rgb c((val)&0xff, (val>>8)&0xff, (val>>16) & 0xff);
|
mapnik::rgb c((val)&0xff, (val>>8)&0xff, (val>>16) & 0xff);
|
||||||
byte index = tree.quantize(c);
|
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
|
if (!((val>>24)&0x80)) index = 0;//alfa
|
||||||
#endif
|
#endif
|
||||||
row_out[x>>1] |= index;
|
row_out[x>>1] |= index;
|
||||||
|
|
Loading…
Reference in a new issue