mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -04:00
Fix PNGs that are encoded using indexed mode and have a transparent chunk not decoding properly on big endian systems (Thanks Doctorj1)
This commit is contained in:
parent
bbedc4e1f1
commit
49729a67a2
@ -442,7 +442,7 @@ cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
|
||||
/* set alpha component of palette */
|
||||
for (i = 0; i < dataSize; i++) {
|
||||
palette[i] &= BITMAPCOL_RGB_MASK; /* set A to 0 */
|
||||
palette[i] |= tmp[i] << PACKEDCOL_A_SHIFT;
|
||||
palette[i] |= tmp[i] << BITMAPCOL_A_SHIFT;
|
||||
}
|
||||
} else if (col == PNG_COL_RGB) {
|
||||
if (dataSize != 6) return PNG_ERR_TRANS_COUNT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user