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.
This commit is contained in:
parent
e8d8530f9a
commit
8c60753db6
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ namespace mapnik {
|
||||||
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
|
||||||
row_out[x>>1] |= index;
|
row_out[x>>1] |= index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue