PCIN, The PC Improvement News logo

  Add to Favorites     Make Home Page

JPG, GIF and BMP Image Formats

One of the services that I offer is teaching people HTML coding. There are a lot of things to remember and the thing that seems to be forgotten the most, is making sure that images have the right extension on them. I mean, you have a GIF (image.gif) file, but you in the HTML, you want try to bring up the same file, but with a JPG extension (image.jpg). This of course will cause the browser to give you a nice little red x.

All this would be solved if there weren't so many different graphic formats. Of course, each format has a different format, so the solution is to pay closer attention, and also to learn what each format is, and why they are used in different situations.

I will briefly describe 4 basic graphic formats.

The first thing that we need to understand is that there are 2 types of image compression, lossy, and lossless. Different image formats use different compression formats.

Lossless compression compresses an image without removing any data. Lossy compression will discard some of the data so that it can be compressed more. Lossy images typically wouldn't have as many colours available.

JPG, JPEG, or Joint Photographic Experts Group Format images have lossy compression. This is a common format used when saving photographs. Doesn't save line art very well.

GIF, or Graphics Interchange Format uses lossless compression. The image quality might not be that high, but there are sharp edges. This is one of the reasons why it is used on web pages for small graphics. It can retain the sharp edges. Another reason is that GIF images can be used on PCs and Macs.

TIF, TIFF, or Tagged Image File Format is also cross-platform between Macs and PCs. There isn't really any compression with this format and the file size can be quite large.

BMP, or Bitmap Format uses a pixel map which contains line by line information. It is a very common format, as it got its start in Windows. This format can cause an image to be super large.

Below is a colour sample of 2 of the formats. The GIF image quality is very poor. The JPG is a nice files size and looks good.
GIF sample GIF, 4583 bytes
JPG sample JPG, 7099 bytes

Below is a black and white sample of the 2 formats. The quality of the images is all quite good, but in this case, the GIF file is the best choice.
GIF sample GIF, 2782 bytes
JPG sample JPG, 6392 bytes

Just remember when you are working with images to pick the best format most appropriate for what you are doing and for the type of picture it is.

Return to Articles Home Page

Return to the FreeHelp Headquarters


PCIN Logo
Subscribe to PCIN now!

Home | Overview | Subscribe | Unsubscribe | Latest Issue | Previous Issues
Free Help Headquarters | Free Help Downloads | PCIN Test Systems
Make Suggestions | Recommend PCIN | Support PCIN | Survey | PCIN.net Site Search
Poll of the Week | Privacy Policy | Links | About Me | Contact Me

Support PCIN
By Donating Today