Mercurial > hg > dmlib
comparison tools/libgfx.c @ 2078:b2f1ce24f81b
Be more informative when attempting to figure out broken PCX file.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 10 Dec 2018 15:41:58 +0200 |
parents | 3dac7a781317 |
children | a14286e2710e |
comparison
equal
deleted
inserted
replaced
2077:838ed06b3927 | 2078:b2f1ce24f81b |
---|---|
1257 } | 1257 } |
1258 | 1258 |
1259 if (hdr.nplanes == 4 && hdr.bitsPerPlane == 4) | 1259 if (hdr.nplanes == 4 && hdr.bitsPerPlane == 4) |
1260 { | 1260 { |
1261 dmMsg(2, | 1261 dmMsg(2, |
1262 "PCX: Probably invalid combination of nplanes and bpp, attempting to fix ..\n"); | 1262 "PCX: Probably invalid combination of nplanes=%d and bpp=%d, attempting to fix ..\n", |
1263 hdr.nplanes, hdr.bitsPerPlane); | |
1263 | 1264 |
1264 hdr.bitsPerPlane = 1; | 1265 hdr.bitsPerPlane = 1; |
1265 } | 1266 } |
1266 | 1267 |
1267 isPaletted = (hdr.bitsPerPlane * hdr.nplanes) <= 8; | 1268 isPaletted = (hdr.bitsPerPlane * hdr.nplanes) <= 8; |