| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
It's very important to understand how indexed images work and what's the difference between indexed images and truecolor images.
In truecolor images every pixel has three values associated: the red, green and blue compontents. These components can have any values (usally from the range 0..255). If each component is stored on one byte, it means one pixel requires at least 3 bytes. But sometimes it is stored in 4 bytes since it's easier to handle them by programs.
In indexed images every pixel has an index associated to it. This is an index in the palette, which is the set of colors the image uses. The palette contains the values of the red, green and blue compontents.
Indexed images has the main advantage that usually they are smaller. Without compression the memory needed for an 100x100 image (with 256 colors) is (100*100) + (3*256) = 10,768 bytes. The same image as truecolor image would require 3*100*100 = 30,000 bytes. Also indexed images can be usually compressed more.
On the other hand they can have much less colors: truecolor images can store up to ~16 million unique colors, while indexed images only up to 256. Index images also needs an extra table lookup. Moreover indexed image cannot handle partial transparency (actualy they can, but it is used very rarely)
So, why using indexed images then? Why is this program specialized in indexed images?
Beacuse of the size! And size does matter: the smaller the better! In mobile games for example programmers and graphic artists have to make the game as small as possible to fit in the mobile phone's memory. While making a PC game they could fill a whole CD or DVD with images, it wouldn't matter, on mobile phones sometimes they must fit everything in 64KB or 100KB or some other limit, depending on mobile phone. Even if the mobile phone doesn't have a limit (or has a higher limit), it's important to make the game as small as possible, to reduce the download costs for the user. And using indexed images instead of truecolor images reduces the size needed by the data a lot.
Indexed images also have history: in the old days when video cards had limited they used indexed display modes. Which means they had a palette and everything needed to be displayed on the screen had to only colors from the palette. Old console games had similar limitations as well.
Sometimes the program have to combine images using different palettes, for example when the image on the clipboard has different palette. In such case if the palette match flag is turned on, it will change pixels according to the new palette. The same happens when loading a new palette: if this flag is on, the program will find the closest color for each pixel in the new palette.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on December, 7 2006 using texi2html 1.76.