SuperFamiconv
SuperFamiconv copied to clipboard
Errors when using no remap, json palettes and 2 BPP mode
In the code here: https://github.com/Optiroc/SuperFamiconv/blob/master/src/Palette.cpp#L93, this check seems wrong when using 2 BPP or more that 1 palette. If the check fails, SuperFamiconv throws an exception and enters the catch block and tries to read the json palette as a binary palette with pretty random results.
In my case, I have a 16 colors palette in the original image that I expect SuperFamiconv to convert to 4 palettes with 4 colors each in 2 bpp mode. The check fails because 16 colors is greater than 4.
Using native binary palettes instead seems to work ok.
Do you have sample JSON input to test with?
Attached the original PNG image and json palette.
superfamiconv command:
superfamiconv tiles -i hud.png -p hud_pal.json -d hud_tileset.chr -B 2 -W 8 -H 8 -v -D -F