Adding support for the following bitmap types (no support for compressed formats, only uncompressed):
1BPP 2 COLOR PALETTE/INDEX <- now supported!
4BPP 16 COLOR PALETTE/INDEX <- now supported!
8BPP 256 COLOR PALETTE/INDEX <- now supported!
16BPP RGB 565 <- always supported!
16BPP XRGB 1555 <- now supported!
16BPP ARGB 1555 <- now supported!
16BPP XRGB 4444 <- now supported!
16BPP ARGB 4444 <- now supported!
~24BPP RGB 888~
~32BPP XRGB 8888~
~32BPP ARGB 8888~
Note: X = unused portion
To do:
[X] Parse all different bitmap types (as well as we can) and determine format (see above list)
[X] For palette/indexed bitmap types (bpp < 16), place color table in RAM in RGB565 format (faster to copy colors to buffer this way). This allows for palettes to be changed at runtime by Python
[X] Copy pixel/index table to RAM or FLASH and flip Y (data is stored upside down in bitmaps)
[X] ~Convert 24 and 32-bit pixel data to 16-bit 565 with an alpha byte as well if the bitmap has it (easier to copy to screen buffer and makes drawing faster)~
[X] Change internal engine API to fetch 16-bit 565 color from any texture type (using in-lining to avoid function calls per pixel, will still add an if or two)
[September 6th, 2024 update]: For now (or maybe forever) we're not going to support 24 or 32 bits bitmaps since they take up so much space and take a long time to copy to scratch (depending on size).
Adding support for the following bitmap types (no support for compressed formats, only uncompressed):
1BPP 2 COLOR PALETTE/INDEX
<- now supported!4BPP 16 COLOR PALETTE/INDEX
<- now supported!8BPP 256 COLOR PALETTE/INDEX
<- now supported!16BPP RGB 565
<- always supported!16BPP XRGB 1555
<- now supported!16BPP ARGB 1555
<- now supported!16BPP XRGB 4444
<- now supported!16BPP ARGB 4444
<- now supported!24BPP RGB 888
~32BPP XRGB 8888
~32BPP ARGB 8888
~Note:
X
= unused portionTo do:
if
or two)[September 6th, 2024 update]: For now (or maybe forever) we're not going to support 24 or 32 bits bitmaps since they take up so much space and take a long time to copy to scratch (depending on size).