in Education by
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: JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
ImageMagick will give a raw, 256*24bit RGB image that GIMP can use as a palette when opening a raw image from your image like this: convert UEw8E.png -resize '16x16!' -filter point -depth 8 palette.rgb (The ! means to force the size, regardless of aspect ratio, needed as your image is not a square. -filter point skips downscale filters. -depth 8 forces 8 bits per colour. Although your image already is 8 bits per colour, it's good to know for certain which format it will output.) The file created, palette.rgb, is a raw array of the 8 bit per colour (24-bit RGB) palette from your image, left to right, top to bottom. (which, I think you were asking for) Now opening any raw image with GIMP (tested with 2.8.22), with the settings Image Type: Indexed Palette Type: R, G, B (normal) Palette File: palette.rgb The palette inside GIMP looks like this (everything is in the same order as in your image):

Related questions

0 votes
    I have a function in c++ that receives a initialised class as a PyObject. The python class is: ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I have a function in c++ that receives a initialised class as a PyObject. The python class is: ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 22, 2022 in Education by JackTerrance
0 votes
    I'm trying to embed python into a C application. For the moment, I am trying to get the following ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    15.In color palette, ………..is a quick way to apply color on shapes. Select the correct answer from above options...
asked Dec 16, 2021 in Education by JackTerrance
0 votes
    In which of the following color gradient types, the colors are arranged in a straight line?...
asked Dec 3, 2020 in Technology by Editorial Staff
0 votes
    Looking for one that is fast enough and still graceful with memory. The image is a 24bpp System.Drawing. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    Looking for one that is fast enough and still graceful with memory. The image is a 24bpp System.Drawing. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    Looking for one that is fast enough and still graceful with memory. The image is a 24bpp System.Drawing. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    Looking for one that is fast enough and still graceful with memory. The image is a 24bpp System.Drawing. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    So i want to save the RelativeLayout (360x360dp) into the phone as a picture. Here is the code ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    Convert a .doc or .pdf to an image and display a thumbnail in Ruby? Does anyone know how to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
0 votes
    Convert a .doc or .pdf to an image and display a thumbnail in Ruby? Does anyone know how to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
0 votes
    Convert a .doc or .pdf to an image and display a thumbnail in Ruby? Does anyone know how to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    Which of the following is the actual code implementation of the feature mentioned in the feature file? Test Runner Step Definition File Feature File None of the Above...
asked Jul 22, 2021 in Technology by JackTerrance
0 votes
    Below are the eight actual values of the target variable in the train file. What is the entropy of the target variable?...
asked Apr 27, 2021 in Technology by JackTerrance
...