Background: I'm trying to look through assets in an old game's archive files. They're 8-bit. I need a palette for them to look correct.
I have the palette. DxWnd supports dumping the active palette.
However, the palette is in the form of a dialog with 16x16 colors (=256) stretched.
[updated to include actual output]
- I then shrunk them to single pixels-per-color. So now I have a 16x16 (true color) bitmap.
I want to get a palette file from that. I don't know if there's a standard format for palettes, or it's just plain-old-data of (256*3 for RGB) bytes. GIMP supports a palette format that you can import when importing "raw image data".
So, the question is: What would be the easiest way to convert this 16x16 image of true-color values to a block of 3x256 bytes palette?
Whether it's tools, or Python, C/C++, or whatever. The point is, this is a minor issue ("wrong data format"). So if some existing tools (Linux or Windows) can use it, by all means.
To be absolutely clear: This isn't a sprite. It doesn't need to be heuristically converted to some "best fit" palette. It's literally the palette.
[edit] I tried, per the comments, to output the palette from GIMP and IrfanView, but I get this, jumbled set of colors instead: