[HOME][CONTENTS][DOWNLOAD][PREV][NEXT]


IMAGE DISPLAY WITH GIMG

Color Composite. An image display device is driven by three basic color components, i.e., red, green, and blue, or RGB in short. Color composite is a process to define each pixel with three basic color components. Each color component has its intensity, which is quantified with a number of bits in a display driver. An 8-bit quantification has 256 different levels with 0 for the minimum and 255 the maximum. The maximum number of colors a display driver can handle is called color depth. A display driver of 8-bit color depth can handle up to 256 colors while a display driver of 24-bit color depth can handle up to 16777216 colors. The implementation of color composite is significantly different for display drivers of different color depths. 

A gimg has two options to make a color composite image in four different display modes, i.e., a black/white mode, a mono-chromatic mode, a bi-chromatic mode and a RGB mode. The first option to make a color composite image is -palette that defines a display mode with a requested number of palettes. An argument of -palette takes two basic formats, nBW and nR/nG/nB, where nBW, nR, nG and nB are integers to specify a requested number of levels for a particular color. An option -palette nBW defines a black/white display mode, where nBW specifies the number of gray levels requested. For an example, an option -palette28 defines a black/white display mode and requests 28 gray levels. An option -palette nR/nG/nB defines a color palette, where nR, nG and nB define requested levels of red, green and blue color components respectively. An option -palettenR/nG/nB may defines a mono-chromatic display mode if two of the color components are of one level, a bi-chromatic display mode if one of the color components is of one level or a RGB mode if none of the color components is of one level. For examples, options -palette 16/1/1, -palettte1/16/1 and -palette1/1/16 define respectively a red, a green and a blue mono-chromatic display mode; options -palette15/15/1, -palette 15/1/15, -palette 1/15/15 define respectively a red/green, a red/blue and a green/blue bi-chromatic display mode; an option -palette8/8/4 defines a RGB display mode. A one level color specification means a NULL color. There is a little difference of the interpretation of an option -palette. In a display driver of 8-bit color depth, the maximum number of color is 256. A gimg always tries its best to satisfy a palette request. If a gimg can not make a requested palette, it will try to find a one that is the closest to the requested palette. In a display driver of 24-bit color depth, a gimg always provides 256 levels for a color in a palette specification. 

The second option to make a color composite image is -comb that defines combined image data channels for individual colors. An argument of -comb has a basic format b1/b2/b3, where b1 defines an image band for the data channel 1, b2 an image band for the data channel 2, and b3 an image band for the data channels 3. Data channels 1, 2 and 3 are assigned to the red, green and blue colors respectively if the option -palette defines a color display mode. Variations of the -comb argument may be b1, 0/b2, 0/0/b3, b1/b2, b1/0/b3, 0/b2/b3 and etc. In a color display mode, the interpretation of the argument is that the first band is assigned to the red color, the second band the green color, and third band the blue color. A ‘0’ means a null band. In a black/white display mode, all data channels are combined to make a pan-chromatic black/white image which is an average of the three input image bands. 

Examples at the right show the different display modes of the same 24-bit / 3-band image. The example at top uses a black/white palette, and a combination of 3 input image bands. The result is an average of all three input bands in a pan-chromatic black/white display mode. Other examles use the same 8/8/4 color palette, but different band combination to achieve different color display mode. 

[HOME][CONTENTS][DOWNLOAD]
 
 

 


-comp 1/2/3 -palette 256 
Black/White Mode 

-comp 1/0/0 -palette 8/8/4
Mono-chromatic Red


-comp 0/2/0 -palette 8/8/4
Mono-chromatic Green


-comp 0/0/3 -palette 8/8/4
Mono-chromatic Blue


-comp 1/2/0 -palette 8/8/4
Bi-chromatic Red/Green


-comp 1/0/3 -palette 8/8/4 
Bi-chromatic Red/Blue


-comp 0/2/3 -palette 8/8/4 
Bi-chromatic Green/Blue


-comp 1/2/3 -palette 8/8/4 
RGB Mode