Contents |
Overview |
|---|
| Computers weren't designed to show pictures. They were designed to compute.
So how do we get pictures in them? How is it possible that computers have become the leading tool for artists? The answer is that ingenious people thought of a way to store pictures as numbers. This module explains in basic terms how this is done. |
The Basics: Bits and Pixels |
|
|---|---|
How Computers Store Everything |
The main reason why computers have been so successful is that they are based on very simple ideas. In order to keep parts inexpensive and operation reliable, the fundamental unit of storage on a computer is a simple on/off switch. Because an on/off switch can have two positions, and because computers were designed to do arithmetic, the Off position is interpreted as the number Zero, and the On position is intepreted as One. Very simple. |
| bits | An on/off switch used this way is called a bit. That's because the numbers zero and one are the digits (number symbols) of the binary (base 2) number system. The words were put together and shortened: Binary+digIT = BIT |
| bytes | Because most people are interested in numbers larger than 1, several bits have to be put together to form bigger numbers. They are usually combined in groups of 8 bits called a byte. (For a little more information about computer storage, see the "Data Storage Principles" module, G15c.) |
How Computers Display Pictures |
Very early in the history of computers, people realized that in order
to display many kinds of output - text in different languages, mathematical
and chemical symbols, diagrams and illustrations - the computer's output
displays should work by building up little tiny dots. For standard symbols
like letters and numbers, the computer could output a predefined pattern
of dots; to represent diagrams and pictures, it could put the dots together
in special ways.
This illustration shows a "happy face" magnified so you can see the individual pixels. (How many pixels are used to make up the eyes?) |
Getting the Details: Resolution |
|||||
|---|---|---|---|---|---|
Precision of Detail is Resolution |
One of the main things that determines how "good" a picture looks, is how much detail you can see in it. If not much details is visible, a picture looks either fuzzy or crude. When a picture is built up of many dots, the size of each dot and how close it is to its neighbor is the most important factor in determining precision and detail.
|
||||
? |
Besides computers, what are some other visual media that use spots of light or color to show images? Are they "high-res" or "low-res"? |
||||
Measuring Resolution |
There are two common ways to measure resolution:
Pitch is the distance between the center of one pixel and the next. Inexpensive monitors have a pitch of .28mm, while the more expensive models have .25mm pitch - that is, 4 pixels in each millimeter. |
||||
? |
Given that there are 25.4 millimeters in an inch, use a calculator to figure out:
|
||||
Adding Color |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Color: A Quick Review |
What we perceive as color is electromagnetic radiation in a particular area of the spectrum which we call "visible light".
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Color on TV Screens |
Color on TV screens (cathode ray tubes) is produced by shooting a beam of electrons at a screen coated with phosphors - materials such as zinc sulphide that emit light in specific wavelengths when they are "hit" by electrons. By combining three wavelengths of light - red, green, and blue, all parts of the visible spectrum can be created. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Color on Early Computers |
All computers (as we mentioned before) use bits to store numbers. Early computer screens, which used the cathode ray tube (CRT) principle, showed only black and one other color (green, blue-white, and orange were the most common) They were monochrome ("one-color") screens. Likewise, computer printers were made to print using black dots on white paper. The principle for storing monochrome images was simple: 1 pixel in the image = 1 bit in the computer In other words, an image was stored by taking the pixels that were bright ("turned on") on the screen, and representing them by bits that were "turned on" (= 1) in the computer.
The pattern of on-off bits in the computer's memory could then be mapped directly to a screen or printer. This is called a bit-mapped image. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Computer Color Evolves |
Humans are built to respond quickly and easily to colors - we get a lot of information from our environment through colors. People soon began to tire of monochrome screens, and the potential for conveying information through color on computer screens led to the development of color storage systems on computers. The original principle used was based on the fact that CRT screens use Red, Green, and Blue (RGB) as "primary colors" to create the entire spectrum of visible light. Most computer color systems were developed based on this principle: 1 primary color in a pixel = 1 bit in the computer This means that at least 3 bits were needed to represent the spectrum, and the CRT's electronics are controlled in a very simple way by having each bit turn on (1) or off (0) the color for one of the three electron streams at a given spot on the screen.
In the most common system, a fourth bit was added to represent the
brightness of a pixel (on = birght, off = dim). This combination gave
16 possible colors by controlling the brightness of each of the three
colors.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Computer Color Today |
Though the 16-color system was a great leap beyond monochrome, it was very crude for representing images of artwork or photographs.
As the cost of storage and rapid movement of bits lowered, we became able to store more and more colors, so that photographs and gradients can now be represented quite well. Today's system represents "millions of colors" by representing each of the three "primary" colors with 8 bits. This gives 2 raised to the 8th power shades of each color, from dark (0) to brightest (255). Combined, we get 2 raised to the 24th power, or 16,777,216 colors! However: not all sixteen million are safe to use on the Web! Only 216 can be relied on...more about this later.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Storing Images |
|
|---|---|
The Problem |
The method of representing colors described above is basic for displaying images on all computers. But there's a problem: for each pixel, at least 24 bits of storage are used. For a 3 by 5 inch photograph, at 72 bits per inch, 1,866,240 bits of storage are needed. That's 233,280 bytes: quite a lot considering the picture isn't very big or very high resolution. There's another problem: suppose, instead of working with photographs, you're working with diagrams such as blueprints or graphs. When you want to change the layout or the proportions, the bit mapping system makes it necessary to move a lot of these bits around. |
The Solution |
Rather than trying to store and display pictures the way they are displayed on a screen, several more practical ways of storing images have been developed using clever mathematical techniques.
|
Two Fundamental Image Representations |
This leads to two funadmentally different ways of storing images: bitmap and vector.
|
Summary: The Trade-offs |
|
|---|---|
|
For every detail of an image stored in a computer, there is a cost: the more details you want, the more storage space it will require. The choice between vector graphics and bitmaps also represents a tradeoff: with vector graphics, more space is required for complex shapes and for little spots of color. Bitmap images make it difficult to preserve the integrity of shapes and individual objects. For each of these trade-offs, the professional needs to know how to balance the advantages and disadvantages to achieve maximum quality in minimum space. That is the secret of success for good computer graphics! |
About this document... |
|
|---|---|
|
Review:
|
Click here for module review questions. ![]() |
Audience: |
This is for people who want to understand the fundamental principles of computer graphics. |
Objectives: |
When you successfully complete this lesson, you will
be able to...
|
Module D20c: |
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, D: Desktop Publishing and Computer Graphics. This document has been used in the following classes: INP 143 |
Author: |
Laurence J. Krieg |
Institution: |
|
| History: | Original: 24 May 2000
Last modification: Tuesday, 17-Feb-2004 12:39:03 EST |
| Copyright: | Copyright © 2000, Laurence J. Krieg.
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 |