Basic Web Graphics

Module W47c

Review |Audience and Objectives | About this document...

Contents

Wherever you see this separator line in the document, clicking on it will return you to the Contents.

Overview


Graphics are one of the main reasons the Web is so attractive.  No Web site is really effective without them! In addition to providing illustrations, they can be used to provide atmosphere and character, including backgrounds, buttons, separators, and other "fun" features. Although these are fun, a good Web site designer takes them seriously! They can make the difference between visitors staying or leaving. They speak to the emotions, to the right half of the brain, and so supplement the communication process in a way words can't. They are also useful in situations where your audience may not be able to read your words. If you have ever visited a Web site in a language you don't know, you'll experience the power of graphics.

Graphic design is a form of art, and it takes years of work and a true gift to produce real graphic art. Fortunately, most of us can easily add art to our Web sites without being artists: it's a matter of knowing where to find the materials. This module discusses the materials for producing graphically-rich Web sites.

For more background on graphics, see module D20c, "Computer Graphics."
 

Types of Graphics


Graphics are technically complex. Computers were designed mainly for doing math, not art. In order to get a computer to show colors and pictures, it has to be "persuaded mathematically" - the pictures have to be converted to numbers somehow. 

There are actually many ways to do that, though only a few are useful on the World Wide Web. That's because most ways of representing images on computers require lots of space. In order to save time downloading images, the Web uses only image formats that compress the graphics into a relatively small space. There are many ways of compressing information, but those used for grpahics have an unfortunate side-effect: in order to be really effective, they leave out some information from the picture! Of course, this involves trade-offs: detail for speed. What kind of information is sacrificed? It depends on the type of image format.

The two most useful forms of graphics on the Web are GIF and JPEG. More recently, a form called PNG has made its appearance. Let's look at each...
 

GIF Images


GIF, Graphic Image Format, is pronounced "giff" (with a "hard g" as in gift, since there is another graphics format called JIF). It was developed in the mid-1980s by computer scientists at CompuServe, then the leading provider of public networking service.
 

GIF Advantages:
  • Very compact format
  • Preserves lines and forms
  • One color can be chosen as "transparent" to let background show through
  • GIFs can be animated to produce motion effects
GIF Disadvantages:
  • Limited to 256 colors

Though limited to 265 colors, the GIF conversion process chooses the 256 most commonly used colors in each picture individually. So for most pictures, 256 is enough.

When to Use GIFs:
Use them by default. But you often get better results on photos of people and landscapes by using JPEG.
 

JPEG Images

JPEG, Joint Photographic Experts Group, pronounced "jay-peg". As the name implies, it's good for photographs, partularly photos of people and landscapes.
 

JPEG Advantages:
  • Good color preservation
  • Variable degrees of compression
JPEG Disadvantages:
  • Can loose sharpness of lines and forms - at high degrees of compression, there is a smudging effect
  • Can't have transparent parts or do animation

JPEG offers a high degree of flexibility, because for each picture you save, you can choose the degree of compression.

When to Use JPEG:
Use JPEG for photos of people and places where sharpness of lines isn't necessarily important. Highly compressed JPEG images are excellent as Web-page backgrounds.
 

PNG Images


PNG: Portable Network Graphics, pronounced "ping". An effort to combine the advantages of GIF and JPEG formats.
 

PNG Advantages:
  • Preserves more color depth than GIF
  • Preserves sharpness better than JPG
PNG Disadvantages:
  • Most browsers don't know how to handle all varieties of PNGs
  • Bulkier than GIFs

Although officially accepted by the major graphics and browser developers, PNGs are not very widespread. The main problem is the wide variety of sub-formats available in PNG, some of which are too complex for browsers to handle. This means that when you save an image as a PNG, you have to be sure it's a variety of PNG that can be handled by browsers. Most Web designers avoid PNG entirely for this reason, and stick to GIF and JPEG.

When to Use PNG:
Use this format if you are sure the sub-format you want to use can be handled by most browsers.
 

Handling Graphics


Often, we can get graphics that don't need to be changed in any way - we can just use them. Occasionally - frequently if we do certain types of work - the graphics we use need help! Within limits, there are software tools to do just about anything, and many are available free or for a very modest price. 

Here we'll discuss two general types of manipulation:

  1. Conversion is necessary when we want to use a graphic file, but find it's not in a form (GIF, JPEG, PNG) we can use on the Web. 
  2. Manipulation is when we need to change the appearance of the graphic: making it larger or smaller, cropping unwanted parts, making it lighter or improving the contrast, changing the color balance, or applying special effects (bluring, sharpening, posterizing, solarizing, squeezing, and many more).

Tools for Conversion


Some commonly used office software suites include tools for graphic manipulation, including conversion. An example is Microsoft Office's Microsoft PhotoEditor, which comes with the higher-end version of Office Professional suite.

You can get freeware or inexpensive shareware graphic conversion programs easily from shareware distributors. Use module NA31g, "Getting Files using a Web Browser," which has a section on graphic converters, to show you exactly how to find and download one.
 

Tools for Manipulation

  • Adobe Photoshop is the premier graphics program for general graphic and photo handling. (And I'm not just saying that because it happens to have been written by the children of a fellow Washtenaw Community College instructor! :-) http://www.adobe.com/prodindex/photoshop/main.html
  • JASC Paintshop is an excellent shareware program that does much of what Photoshop does. I can't afford Photoshop, so I use Paintshop. http://www.jasc.com/psp5.html
  • Microsoft Photo Editor is available with some versions of MS Office (you can find it by using the Windows Start menu under Programs...MS Office...Microsoft Photo Editor). 

Obtaining Graphics


There are many, many ways you can get graphics for your Web pages - besides creating them yourself, of course! This section takes a look at many of them...but first, a note about legal issues.

Legal Issues


By default, all "intellectual property" including the graphics you see on the Web are protected from theft by copyright laws, which apply in almost all countries of the world. Copyright is a complex area of law, and since I am not an attorney, I can't give you legally valid advice! However, I can direct you to authoritative sources in another module, A05c "The Computer User's Guide to Copyright."

Here's a "rule of thumb" to go by: although many Web page authors don't object if you use graphics from their pages, it's a good idea to ask their permission if you would like to use anything major or distinctive from their site. If you want to use graphics from a site that collects or designs artwork specifically for people to download, be sure you read their statement on what constitutes legal use. They may ask you to limit your use to a certain number of pictures, or they may ask you to include acknowledgement of the source, including a link to it. If you want to use their artwork, be sure to comply with their requests! Warning: A copyright lawsuit can be hazardous to your career.
 

From Web Pages


It is very simple to take a graphic image from a Web page for use on your own. When you see a graphic you like,

  1. Point to it with your mouse
    • Windows: click on it with the right mouse button
    • Macintosh: double-click it
  2. On the context menu that pops up, select Save Image As
  3. Select the location for saving the file on your computer, and click OK.
If you want to save the background image from a Web page you see, point to the background and follow the same procedure, selecting Save Background As from the context menu.

Be sure to ask permission if you take a large or distinctive work or art for your own use!
 

From Graphics Sites


There are large numbers of Web sites devoted to graphic images where you can download them and use them.

From CDs


A large selection of artwork is available commercially on CD-ROM. Visit a local software retail store and browse their collection.

One advantage of CDs is that they are intended for people to use on their own publications. It's wise to check the license agreement though, just to make sure publication on the Web is allowed.

An alternative type of CD is the Kodak PhotoCD. This system allows you to have pictures from your own camera saved as digital images on a CD. Each CD holds up to 100 images, each in five resolutions from "thumbnail" to very high detail.
 

From Your Screen


Anything that appears on your screen can actually be "captured" and saved as a separate graphic. I suspect that you will get better results saving a graphic image as discussed in the From the Web section, because every time an image is rendered on screen and re-captured as a file, some of the original quality may be lost. The quality is limited by the resolution and color depth of the video display you are using when you do the capture, and that may be lower than the quality of the original. Screen captures are useful for illustrating computer processes - showing menus and buttons. I do it frequently in preparing lessons, but that's a bit specialized.

The most convenient way to do this is with a graphics program such as PaintShop that lets you select the area of screen you want. You can then fiddle with it if you like, or save it directly in a Web format.

Windows also has a built-in screen capture facility using <Alt><PrintScreen> that is, hold down the Alt key and tap the Print Screen button on the keyboard. This puts the entire screen into the "clipboard" and allows you to paste it into programs that handle graphics. 

For example, you could paste it into MS PhotoEditor and save it as a GIF. If you don't have anything else, you can paste it into the Windows Paint utility - but Paint can only save graphics in the BMP format - not useful on the Web! You would need to use a graphics converter program to make it a GIF or JPEG. 
 

By Scanning


Scanning is the process of turning a physical image - a photograph or a piece of paper - into a digital computer graphic. Most scanners look like small photocopiers attached to computers.

We can't go into detail of how to use a scanner in this module, but it's not hard. Here's the general idea:

  1. Run a graphics program such as PhotoShop.
  2. From the menu or tool bar, select Scan or Image Capture. this activates the scanner. 
  3. Scanner software will give you a number of options, depending on the scanner. These include pre-scanning, setting the size, resolution, and determining the type of image being scanned (black-and-white, greyscale, color, etc.). 
  4. The results of the scanning will be appear in your graphics program, and you can either make adjustments or save it immediately in a Web format.

Digital Photos and Video Stills


Another source for Web graphics is digital cameras. As these become more affordable, they offer increasingly higher resolution and memory capacity. When you have enough pictures, you plug them into your computer and run software that brings the images into your computer. You may have to use a graphics converter program to use them on the Web.

Diagrams from Drawing Programs


Commonly available office software suites like MS Office often have features that let you add diagrams, charts, and fancy lettering ("Word Art" in Microsoft terminology). There are a couple of ways to make these available on the Web.

The first is to do a screen capture. This works, but I often hesitate to recommend it because of possible deterioration of the quality of the image. 

The other method is copy-and-paste, which is less dependent on the quality of the screen you're using. This method is discussed in some detail in module W36c on converting information from MS Word to the Web.
 


 About this document...

Link to review questions and answers.

Audience:

This is for people who want to bring graphics into their Web pages and need to know what kinds of files can be used, where to get them, and what tools to use.

Objectives:

When you successfully complete this lesson, you will be able to...
  1. List the types of graphic files that can be used on the World Wide Web;
  2. Discuss the advantages and disadvantages of different kinds of graphics formats;
  3. Save graphics from the Web onto a local disk;
  4. Find sources of graphics on the Web;
  5. Understand the basics of copyright with regard to using graphics from the Web;
  6. Discuss the process of capturing all or part of what appears on a computer screen;
  7. Discuss the commonly-used tools available for handling graphics, and where to get them.

Module W47c: Basic Web Graphics

This document is part of a modular instruction series in Computer Information Systems. For more information, see the overview or the list of modules in this series, W: World Wide Web. This document has been used in the following classes: CIS 260, INP 140, INP 150, INP 152

Author:

Laurence J. Krieg

Institution:

Department of Computer Information Systems, Washtenaw Community College
History: Original: 19 May 1999
This version posted Friday, 05-Jun-2009 09:39:47 EDT
Copyright: Copyright © 1999, 2004 Laurence J. Krieg, Washtenaw Community College.
Instructors: You may point to this file in your Web-based materials.
Students: you may make a copy for your personal use.
All other uses: contact the author, Laurence J. Krieg for permission. Email krieg@ieee.org