Users browsing this thread: 2 Guest(s)
Basics?
#7
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.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply


Messages In This Thread
Basics? - by Struggleton! - 07-23-2015, 07:45 AM
RE: Basics? - by puggsoy - 07-24-2015, 01:38 AM
RE: Basics? - by Struggleton! - 07-24-2015, 07:34 AM
RE: Basics? - by Struggleton! - 10-03-2015, 01:51 AM
RE: Basics? - by Vipershark - 10-03-2015, 01:59 AM
RE: Basics? - by Struggleton! - 10-03-2015, 02:39 AM
RE: Basics? - by puggsoy - 10-03-2015, 07:34 AM
RE: Basics? - by Struggleton! - 10-03-2015, 12:53 PM
RE: Basics? - by puggsoy - 10-03-2015, 11:28 PM
RE: Basics? - by TGE - 10-04-2015, 09:18 AM

Forum Jump: