JPEG's

JPEG stands for Joint Photographic Experts Group, the original name of the committee that wrote the standard. It was designed to take advantage of the fact that the human eye perceives small changes in color less accurately than small changes in brightness, thus making it the perfect medium to compress real-world scenes such as photographs, realistic computer graphics and similar work. The format has a difficult time with very sharp edges, such as black text on a white background or simple line drawings, causing the edges to blur if you don't use a high quality setting.

JPEG is "lossy." This means that the image you end up with isn't quite the same as the one you started with. JPEG compresses images by removing pixels while the gif format reduces the number of colors to 256 or less and compresses the reduced image data using LZW compression. LZW compresses repetitive data, meaning that large areas of the same color compress very efficiently. You shouldn't save your graphic as a JPG, return to it later for additional editing and save it again. Each tme you do this you will lose quality, especially if you use different quality settings. It is better to edit your photograph in TIFF of PNG, converting it to JPG only when it is ready to place on your website.


Below, we will explore the difference in compression settings and the quality and file sizes that result from different settings.


10,8kb

30,5kb

50,4kb

70,3kb

90,2kb
With data compression set to 10 we have a high quality graphic. By setting the data compression to 30 we have not noticeably lost any quality, but the file size has been decreased from 8kb to 5kb... nearly half the original size! A data compression of 50 gives us a file that drops by only one more kb and the quality of the graphic is starting to degrade. By the time we compress the data to 90 the graphic quality is in serious trouble.

gif-8bit

gif-4bit
Just for comparisons sake, we see here 2 gifs, an 8bit gif totaling 11kb but excellent quality, and a 4 bit gif with the same kb as the jpg which was compressed to 50, but with obvious color loss.

Sources:

Jasc.Inc
Bandwidth Conservation Society
The Ohio State University Dept. of Computer and Information ScienceJPEG Image Compression FAQ, part 1/2
Preparing Graphics For The Web
Which format is better for WWW image purposes, JPEG or GIF?








Sponsored in part
by

Digital Daze