(C API) graphics->loadBitmap crops dimensions of 4-bit GIF

I have been using GraphicsGale to create 4-bit GIFs using the same palette as the Playdate Simulator screenshots. This seems to work well for the most part, but I noticed in this image where I baked in some transparent margins, the loadBitmap function crops all my margins out.

Here is the image:
LCD_1

The dimensions of the image are 16x23, so I expect the resulting LCDBitmap to have those dimensions.
But, when I load this in loadBitmap, the dimensions that getBitmapData returns are 6x19.

Platform details: Playdate Simulator on Windows 10, VS2019 toolchain

Hm, if I manually provide the dimensions, the correct underlying bitmap data seems to be intact. So maybe the bug is in getBitmapData instead?

I have a merge request in the pipeline to fix this, hopefully out in the next update. Once that's in getBitmapData() will convert trimmed margins back into transparent pixels in the bitmap data.

2 Likes