Skip to content

Instantly share code, notes, and snippets.

View Fatih120's full-sized avatar

Fatih Fatih120

View GitHub Profile
@Fatih120
Fatih120 / riff2png.py
Created March 23, 2024 13:48
RIFF Palette to PNG (With Indexed Palette) (MBAACC)
# This converts RIFF palette files to PNGs, turning the index map
# into a 256-colour table that you'd use in UNIB.
# As far as I know, this is only useful for if you want to convert
# palettes from older Melty Blood games, which have been extracted
# and posted to The Spriter's Resource under PS2, but not as PNGs.
# This should do the work for you and give you your 36 colours.
# Feel free to edit it for other palette formats. Maybe I'll turn
# this into a gist, but I don't know what other purposes you'd use it.
# Many thanks to the contributors of the wiki here: https://worms2d.info/Palette_file