What is an Image?

An image is a rectangular grid of pixels. It has a definite height and a definite width counted in pixels. Each pixel is square and has a fixed size on a given display. however different computer monitors may use different sized pixels.

Each pixel has a color. The color is a 32-bit integer. The first eight bits determine the redness of the pixel, the next eight bits the greenness, the next eight bits the blueness, and the remaining eight bits the transparency of the pixel.

11111111
11111111
11111111
11111111
Transparency Red Green Blue

Each of these values can be interpreted as an unsigned byte between 0 and 255. Within the color higher numbers are brighter. Thus a red of 0 is no red at all while a red of 255 is a very bright red.

Currently Java only supports two levels of transparency: Completely opaque (255) and completely transparent (0). Values of 1 through 254 are treated as completely transparent.

Different colors are made by mixing different levels of the three primary colors. For example, medium gray is 127 red, 127 green, and 127 blue.

255 127 127 127

Medium Grey

Pure white is 255 red, 255 green, 255 blue.

255 255 255 255

Bright White

Pure red is 255 red, 0 green, 0 blue.

255 255 0 0

Pure Red

A light cream is 255 red, 231 green, and 187 blue.

255 255 231 187

Light Cream


Previous | Next | Top
Last Modified March 31, 1997
Copyright 1997 Elliotte Rusty Harold
elharo@metalab.unc.edu