![]() |
|
lectures / gimp intro / 5
file color typesThere are various ways that your file will store it's number and type of colors. The most standard is the RGB color standard. The bit-depth of this type of image will store one of 256^3 = 16,777,200 different colors for each pixel, and each pixel can store one of 256 different levels of the alpha channel. (Alpha channel stores transparency information). So these would be 24-bit color images.
Indexed color is typically chosen to create GIF images. There are various optimization techniques to achieve smaller GIF file sizes. One of the most effective is reducing the number of colors in your pallette. GIFs are compressed by looking for horizontal and vertical patterns. The larger your color pallette, the smaller your patterns will tend to be. Gradients can be murderous on the balance of small file size, and visual quality. Greyscaled images are a form of indexed color. Considering these points, GIFs are much better suited for cartoons, titles, icons, essentially images with a small number of colors. GIFs can store one extra color in their pallete - transparent. This is not a full gradient of transparency, like an alpha channel, but a single bit which marks for each pixel whether or not it should allow the background color to show through. When producing well crafted gifs for the web, many times your colors will blend with the background color. There may be alpha-channeled spare pixels hanging around the edges of your image. You can specify which background color you want these semi-transparent pixels to average together with. If the background color is changed, these can then betray a halo - oddly mixed colors surrounding the image.
A third format that is being developed for the web is the PNG standard. PNG boasts to support alpha channels, and have a better compression rate than both JPEGs and GIFs. Many of the modern web browsers support PNG, but many of the older ones do not. This is one of the reasons that it is not widely adopted yet, but PNGs have a bright future.
|