Posted 31 March 2006 - 05:43 AM
More than you ever wanted to know about common image formats!
Note about "bits per channel" -- most images are stored in RGB format, meaning each pixel is made up of a red, a green, and a blue "channel." The more bits per channel, the greater range of colors can be produced. Some formats (PNG...) also support an "alpha" channel for transparency, and thus use a format called RGBA (red, green, blue, alpha). "Color depth" refers to the total bits per pixel -- 8 bits per channel times 3 channels (RGB) results in 24-bit color; with 4 channels (RBGA) we get 32-bit color.
Now... more stuff:
BMP
--No compression.
--Supports up to 8 bits per channel.
--No transparency.
--No animation.
--Don't use it unless you have to, due to the high file size.
GIF
--Lossless compression.
--Supports 8 bits per channel, but each image is limited to an indexed pallette of no more than 256 colors.
--One color on the pallette may be designated as transparent, but alpha channels are not supported.
--Supports animation.
--Probably the best format to use if you need neither a full pallette nor alpha channels.
JPEG
--Lossy compression, visually (and in some ways operationally) similar to that of MPEG video, resulting in blockiness and blurriness, especially at lower Quality levels.
--Supports 8 bits per channel.
--No transparency.
--No animation.
--Best for photographs if the lossy compression isn't an issue (for archival purposes, use PNG, TIFF, or another lossless format)
PNG
--Lossless compression.
--Supports indexed color similar to GIF; also supports up to 16 bits per channel for non-indexed grayscale and color images with or without alpha channels.
--Alpha channels are supported, allowing for "partial" transparency.
--Animation is supported by the MNG format, which is otherwise similar to PNG.
--If you don't mind GIF's limits, use it, as it's better-supported than PNG. (Internet Explorer, for instance, ignores alpha channels in PNG images.)
Those who will remember, will speak fondly of the warm morning breeze.