What Are The Image Types
When creating images for your website, you will need to know what the different graphic types are and what their respective advantages and disadvantages are. Some graphic types have certain attributes whilst others do not. You will find that .jpg and .gif are the most commonly used graphic types on the web, but .png are also widely used too.
GIF (Graphics Interchange Format)
Developed in 1987 by CompuServe, .gif images are now used widely on the web.
GIF was created because a graphic format was needed that could be used by everyone. It is often used for clip art type pictures or images that have few distinct colors. It supports 8 bits. Gif images use indexed color therefore they support the use of 256 colors. Gifs use a lossless compression algorithm. This means that you can save over the gif format as many times as you want an it won't change the way the image looks. Information is not lost about the image when you save the file. Gifs can also be saved with transparency which means that you can take an image and pull out a color so that it fits well on the background of your web page. Gifs can also be used to create animations.
You would use the gif format when you are working with an image that has less than 256 colors. If your image has gradients then gif would not be the best format to use. Usually clip art images work best in gif. Photographs do not look good when saved as gif therefore it is better to save them as a jpeg. If you need part of your image to be transparent or if you want to create an animated gif then GIF is the right file format for you.
JPEG (Joint Photographic Experts Group)
This file format was created by the Joint Photographic Experts Group. It was created out of the need to compress gray scale or full color images. Jpeg images are saved in a compressed format. It allows for differing degrees of compression. It is able to handle more than 256 colors. In fact is supports millions of colors. Photos saved in this format will appear close to their original state, without losing their crispness. This file format also presents gradients very well, but it does not support transparency. The jpeg format is one of the two most widely used format for images on the web. JPEG is a lossy file format. Each time you save a jpeg it take some of the information and throws it away. Therefore the more you save over a JPEG the worse your picture will look. Always use the original when you are making changes and saving the file so that this doesn't happen.
You use JPEG most often for full color images or images that will use more than 256 colors. If your image has subtle transitions such as paintings or well elaborate pencil drawings. If your image has gradients or beveling it is often better to use the JPEG file format.