Closed TakWolf closed 1 year ago
In nimPNG,there are 5 png modes:
PNGColorType* = enum LCT_GREY = 0, # greyscale: 1,2,4,8,16 bit LCT_RGB = 2, # RGB: 8,16 bit LCT_PALETTE = 3, # palette: 1,2,4,8 bit LCT_GREY_ALPHA = 4, # greyscale with alpha: 8,16 bit LCT_RGBA = 6 # RGB with alpha: 8,16 bit
In loadSurfaceFromPNG only support 3 modes:
if pngInfo.mode.colorType == LCT_RGBA: elif pngInfo.mode.colorType == LCT_RGB: elif pngInfo.mode.colorType == LCT_PALETTE:
In loadSurfaceFromPNGNoConvert only support 2 modes:
if pngInfo.mode.colorType == LCT_RGBA: elif pngInfo.mode.colorType == LCT_PALETTE:
Why there not support all png modes? Is it just an oversight, or a specific reason for it?
At least grayscale mode is commonly used, that should be supported.
Is it related to this?
Paletted Bitmap Graphics (you can load a custom palette up to 256 colors)
In nimPNG,there are 5 png modes:
In loadSurfaceFromPNG only support 3 modes:
In loadSurfaceFromPNGNoConvert only support 2 modes:
Why there not support all png modes? Is it just an oversight, or a specific reason for it?
At least grayscale mode is commonly used, that should be supported.