10-03-2015, 07:34 AM
OK so, basically a palette is a collection of colours. These colours are read just like any colour, which I'm assuming you know how to.
In the actual pixel data, each pixel is just a number pointing to an index within the palette. For example, if the first colour in the palette is 0xFFFF0000 (in ARGB32 that's opaque red) and you wanted a particular pixel to be red, the byte(s) representing that pixel would have a value of 0 (palettes are almost always zero-indexed). A program decoding this format would read the pixel number, go to the palette, grab the colour, then make the pixel in the image that colour.
I hope that clears things up? If you'd like I can maybe find some simple formats (or make a fake one) so that I can explain it more specifically without being so general.
In the actual pixel data, each pixel is just a number pointing to an index within the palette. For example, if the first colour in the palette is 0xFFFF0000 (in ARGB32 that's opaque red) and you wanted a particular pixel to be red, the byte(s) representing that pixel would have a value of 0 (palettes are almost always zero-indexed). A program decoding this format would read the pixel number, go to the palette, grab the colour, then make the pixel in the image that colour.
I hope that clears things up? If you'd like I can maybe find some simple formats (or make a fake one) so that I can explain it more specifically without being so general.