Closed v0l closed 4 years ago
https://github.com/bkaradzic/bimg/blob/master/src/image_decode.cpp#L110
Example image: https://tile.openstreetmap.org//5/13/13.png
The image is only 1bit bitdepth, but the colortype is LCT_PALETTE
bitdepth
colortype
LCT_PALETTE
Might be better to switch on colortype then bitdepth
Output from pnginfo
pnginfo
13.png... Image Width: 256 Image Length: 256 Bitdepth (Bits/Sample): 1 Channels (Samples/Pixel): 1 Pixel depth (Pixel Depth): 1 Colour Type (Photometric Interpretation): PALETTED COLOUR (1 colours, 0 transparent) Image filter: Single row per byte filter Interlacing: No interlacing Compression Scheme: Deflate method 8, 32k window Resolution: 0, 0 (unit unknown) FillOrder: msb-to-lsb Byte Order: Network (Big Endian) Number of text strings: 0
If you have fix you can send PR.
I only load png so i switch to use lodepng directly
So you don't have problem then?
https://github.com/bkaradzic/bimg/blob/master/src/image_decode.cpp#L110
Example image: https://tile.openstreetmap.org//5/13/13.png
The image is only 1bit
bitdepth
, but thecolortype
isLCT_PALETTE
Might be better to switch on
colortype
thenbitdepth
Output from
pnginfo