Departments
 Info
   Home Page
   Articles
   Software Goodies

 Explanations
   How do they do that?
   The Web in Focus

 Resources
   Web Site Stuff
   Tech Books
   E-Books
   Tech Toys
   Web Hosting
   Links

 Women
   Opinion
   Tech Women
   Women's Studies

 Tech News
   Computer Security
   Databases
   Java
   Linux
   MP3
   PC Software
   Robotics
   Site Owner
   Tech Latest
   Web Development
   XML

 Spread the Word
   Newsletter
   Recommend this Page

 Site Info
   Legal Disclaimer
   Privacy
   Contact

 Lighter Side
   Crazy for Life
   crazy for romance
   Crazy for Kitties
   Crazy for Dogs
   Crazy for Cows

Copyright 2000-2001, hertechnology.com

 
How do they do that?
Transparent Color in a GIF Image

This image is the same one that appears in the upper left hand corner of the Her Technology web page. But you'll notice that here the image background is white while up there it is the stripy one. In other words, this graphics image has a transparent background. This situation occurs because the logo image is stored in a GIF file with one of the colors made transparent. Huh?

Let's digress and dig a little deeper. First, we'll address the concept of a graphics file and its format.

Graphics files and formats

On a computer, files are used to contain information. Sometimes the information is text that you can read and edit, and these files are typically text files (created with a program like Notepad) or word processing document files. Other times the information is a picture of some kind, and these files are stored as graphics files.

In order to store a picture in a file, a convention has to be used to represent the picture. That is, the colors that you see (or the shapes) have to be turned into something that the computer can work with. Computers only understand 0 and 1; consequently, the picture has to be turned into a sequence of 0's and 1's.

But not just any, random, sequence. Instead, the sequence of 0's and 1's is precisely defined. This definition is the graphics format.

There are many different graphics formats. The reason there are many is because they satisfy different purposes. For example, it might be necessary to keep the image in perfect detail, no matter how big the file is. Or, maybe it is more important to keep the file size small and lose some of the details. One graphics format would be used in the first case and a different graphics format would be used in the second.

There is one type of graphics format that allows you to make a color transparent so that the background shows through. That format is the GIF format (technically, GIF89a).

We'll get back to color in a minute, but let's address the second item: pixels.

Pixels

Images are shown using little dots called pixels. Your monitor creates what you see on the screen by coloring each dot a particular color, rather like a pointillist painting, only the dots are a lot smaller. The resolution of your screen determines how big the dots are. The higher the resolution, the more dots per inch, and the smaller the dots. Printers that have 300 dots per inch (dpi) have a very high resolution; each dot is only 1/300th of an inch in height and width. Your monitor's resolution won't be that good.

Page 2

Tech Books

Tech Toys

More News

  Want to bookmark this site? Press Control-D. (Hold down the control key and the letter D at the same time.)