Graphics for the web The Most Common Formats


One of the early problems on the net was how to display graphics. The first
browsers only displayed textual information - the modern browser with it's
images, multimedia and plugin's did not exist. Everything was text based.

Now there are hundreds of image formats, although only a handful are
actually appropriate for the internet. And to make things even more
confusing, there are additional ways to display pictures including Java,
ActiveX, Dynamic HTML and so on (although these tend to just display
variations on the standard web graphics formats).

And if that wasn't bad enough, email and newsgroups never evolved a real,
built-in standard for images. These two formats are text based and have
remained so in spite of the changes in browsers and technology. Special
encoding technology has been created to allow attachments to be sent with
messages. Most of the modern email clients detect this and perform the
conversion automatically.

For the web, the dominant formats are GIF and JPEG. BMP (bit mask images)
are occasionally used, and the up-and-coming PNG format seems poised to
threaten GIF in a few years. The GIF format is perhaps the oldest and most
powerful of the formats (except for the limitation of 256 colors), since it
supports animation, interlacing and transparency. The other dominant format,
JPG, tends to create smaller, albeit fuzzier images.

The three major web formats for graphics are described briefly below.

GIF (Graphics Interchange Format) - This is probably the most widely used
format on the internet. It was created by CompuServe in 1987 to display
images on their service. Some of the great features of this graphics format
include:

- Excellent compression - images created in the GIF format can be optimized
to very small sizes.

- Interlacing - Allows images to "fade" in slowly. This is very useful for
large images.

- Transparency - The ability to make a color be transparent, allowing the
background of the web page to show through.

- Animation - You can tie together multiple images to create animation.

The problems of GIF are:

- GIF uses a proprietary encoding/decoding scheme called LZW (Lempel Zev
Welch). This scheme is patented by Unisys, who has been sending out letters
demanding compensation from some companies who have created commercial image
applications.

- GIF images can only include 256 colors.

JPEG (Joint Photographic Experts Group) - Another very common format on the
internet. JPEG (also known as JPG) images use a lossy compression scheme.
This means that as you optimize your image bits are removed. When the image
is decompressed, the bits are interpolated. This means that as you use
greater and greater compression, your image tends to get fuzzier and
fuzzier.

This format is best for images with gradients, such as paintings and photos.
Images with sharp definition, such as clipart and text, should be saved as
GIF or PNG.

JPEG images can often be compressed to smaller sizes than the exact same
image in GIF format, although some definition may be lost. Depending upon
the image, this may or may not be important.

The main reason why JPEG images would be used instead of GIF is that JPEG's
support more than 256 colors.

PNG (Portable Network Graphics) - PNG is a new, up-and-coming format. PNG
has all of the features of GIF except for animation, and PNG has the
advantage of allowing for more than 256 colors. In addition, the compression
algorithm of PNG is public domain and non-lossy (bits of the image are not
lost), which makes it superior to both GIF and JPG.

All of the newer browsers support PNG format, including Netscape and
Internet Explorer. You should still use this format with caution, as older
browsers do not support it at all. Thus, if you use the format you are
more-or-less locking out those who have not upgraded their browsers.

About the Author

Richard Lowe Jr. is the webmaster of Internet Tips And Secrets. This
website includes over 1,000 free articles to improve your internet
profits, enjoyment and knowledge.
Web Site Address: http://www.internet-tips.net
Weekly newsletter: http://www.internet-tips.net/joinlist.htm
Daily Tips: mailto:internet-tips@GetResponse.com