SuperFamiconv
SuperFamiconv copied to clipboard
Colours Don't Fit in Palette error when converting image to 2BPP tilemap.
This is the image used:
In the makefile, these arguments were used:
$(SUFACONV) palette -i $< -d bg0.pal -C 4 -v
$(SUFACONV) tiles -i $< -p bg0.pal -d bg0.pic -B 2 -v
$(SUFACONV) map -i $< -p bg0.pal -t bg0.pic -d bg0.map -B 2 -v
This is the error log I got:
superfamiconv -i bg0.png -p bg0.pal -t bg0.pic -m bg0.map -B 2 -v
Loaded image from "bg0.png" (60x160, indexed color)
Mapping optimized palette (8x4 entries for 8x8 tiles)
Setting color zero to #ffffffff
Generated palette with [4,4,4,4,4,4] colors, 24 total
Created optimized tileset with 118 tiles (discarded 42 redudant tiles)
Mapping 160 8x8 image slices
Error: Colors don't fit in palette
make: *** [Makefile:19: bg0.pic] Error 1
I have tried converting the palette, tileset, and tilemap separately, and it seems the problem starts to happen during the tilemap conversion.
This is the log I got for that:
superfamiconv map -i bg0.png -p bg0.pal -t bg0.pic -d bg0.map -B 2 -v
Loaded image from "bg0.png" (60x160, indexed color)
Loaded palette from "bg0.pal" ([4,4,4,4,4,4] colors, 24 total)
Loaded tiles from "bg0.pic" (118 tiles)
Mapping 160 8x8 image slices
Error: Colors don't fit in palette
make: *** [Makefile:22: bg0.pic] Error 1
So the palette was successfully generated, the tiles were successfully generated, but for some reason, the map wasn't? I literally explicitly set the -B BPP command to '2'.
that is barely readable, you might wanna use code fencing: ``` code ```
that is barely readable, you might wanna use code fencing:
code
Thanks lol
Same problem. I have a picture that each 8x8 tile has 3 colors, but there are 24 colors in total. Superfamiconv throws "colors don't fit in palette" error if total colors >4.
Your image is not an even number of tiles wide. Pad its right side so it's 64px (8 tiles) wide and it will work.