Graphic Elements


 

Standard Web graphic formats

  • GIF - Graphics Interchange Format
  • JPEG - Joint Photographic Experts Group
  • PNG - Portable Network Graphics ("ping")


Image compression

  • Makes image smaller (storage/downloading)
  • Client computer decompresses the images
  • Lossless compression
    • No image data is discarded during compression
    • GIF uses LZW (Lempel-Ziv & Welch) compression (similar to RLE)
  • Lossy compression
    • Image data may be discarded during compression
    • Different levels of compression available
      • Low compression - high quality images
      • Medium - usually good quality images
      • High - image artifacts, poor quality (may) begin to show
  • Run Length Encoding (RLE) compression
    • Compresses images horizontally
    • That is, RLE is bad for horizontal gradients
    • Use top-to-bottom gradients instead

Image size and file size

  • Keep image file sizes as small as possible
  • Keep total page size under 40 kilobytes (100KB at most)
  • Avoid huge graphic files
    • Break them down into smaller images
    • Netscape can load multiple files at the time!
  • Use individual graphics/links instead of huge imagemaps
  • Use preview/thumbnails for large images
  • Let users know about size of large images, or other multimedia content; e.g. (80KB)
  • Exploit the browser's cache: reuse images already downloaded
  • Avoid anti-aliasing, too many colors and too much dithering


Image (IMG tag) attributes

  • Use HEIGHT= and WIDTH= attributes for fast layout
  • Use Alt= attribute for alternate text
    • Helps character-based browser users
    • Users who have disabled auto image loading see alternate text
    • New browsers display it on "mouseover"
  • Use Lowsrc= attribute for low quality previews

An example of a lowsrc image:

  The Browser-Safe Color Palette

Unix vs Windows/Mac color palettes

  • Unix versions of Netscape use a different color palette than Win/Mac versions. For SunOS and 24/8-bit monitors, use hex values with 00, 40, 80, BF or FF pair combinations.

  ITL Graphic Resource Links

  McCannas.com Free Art Site

  Barry's Clipart Server

 

Sometimes bad image management can detract from a Web page: http://saweb.uta.edu/sports/recreation.htm


Last Modified: March 16, 1998 — Instructional Technology Lab