rgbds
rgbds copied to clipboard
Assertion fails in RGBGFX
RGBGFX somehow thinks a 5-color tile has 13 colors:
$ ./rgbgfx -n 64 foo.png
warning: Fusing colors #00447eff and #00407dff into Game Boy color $3d00 [first seen at x: 17, y: 120]
FATAL: Tile at (152, 224) has 13 opaque colors, more than 4!
Conversion aborted after 1 error
If the tile is edited to have 4 colors, an assertion is tripped:
$ ./rgbgfx -n 64 -o foo2.2bpp foo2.png
warning: Fusing colors #00447eff and #00407dff into Game Boy color $3d00 [first seen at x: 17, y: 120]
rgbgfx: src/gfx/process.cpp:733: static uint16_t TileData::rowBitplanes(const Png::TilesVisitor::Tile&, const Palette&, uint32_t): Assertion `index < palette.size()' failed.
Aborted (core dumped)
Notes:
- Editing
#00447eand#00407dto be the same color to avoid fusing has no effect on these issues.