Graphics home


Finding and using graphics

Why graphics are a bit difficult

Graphics file formats

Color on the web

Color combinations

Image maps and graphics slicing

Transparencies

Animations

Backgrounds

Common problems 



Classes home

HTML Info home

 

Graphics

Jeff Williamson
Northern Virginia Community College
www.nvcc.edu/home/nvwillj/html-graphics/
nvwillj@nvcc.edu


Graphics file formats

Print media have used computer graphics for over a decade now, and most of what you find in a graphics program today was developed for print.  Just in my copy of PaintShop Pro I count 32 separate graphics file formats that I can save to, which include extensions such as .PCX, .TIF, .BMP, and .WMF.

Somewhat fortunately, only two file formats are widely supported on the web.  They are

GIF (Graphics Interchange Format) - The GIF format uses a compression scheme which favors long runs of identically colored pixels (see my section on color for more info). GIF compression is lossless, meaning that there is no image degradation when you save a file into this format, e.g. saving and resaving .GIF files has no effect on them.

and

JPEG (Joint Photo Experts Group) - The JPEG format  uses a compression scheme which is more appropriate for photographs.  JPEG (or JPG) files are lossy, meaning that after you save a file as a JPEG, you have lost some information from the original, i.e. saving and resaving JPG files is like making a copy of a copy of a copy - the image gets worse each time - much worse than repeated photocopies, in fact.

When do you use what? Like everything about graphics, "it depends." But the general guideline is

JPG for photographic images with millions of colors, and
GIF for everything else, including animated and transparent images.

Most everything you make from scratch will be GIF files.

Note: Because GIF and JPEG are optimized for display rather than editing, graphic artists rarely create and edit work in these formats.  Instead they use a format like TIFF (Tagged Image File Format) or PSD (Adobe Photoshop) for editing and then they save copies in GIF and JPG formats for end users.

It's pretty clear that PNG (Portable Network Graphic) will be the next widely supported file format.  PNG has all sorts of compression and display features not found in GIF and JPG, and - yes, people debate and plan these things - it has an unambiguous pronunciation - /ping/ (People vary over GIF's pronunciation - /gif/ or /jif/).

The problems with PNG right now are that (a) it is not supported by pre-4 level browsers, (b) it is supported differently by the 4-level browsers, and (c) it doesn't offer all that many advantages to cause pre-4 browser users to upgrade.  

 

Comments? Questions? Visit the help page

Machine translations of this page into
Spanish, French, German, Italian, and Portugese
are available

Last updated information on updates page