Generates a pseudo true-color image suitable for display on devices capable of displaying 256 simultaneous colors.
grn_img A 2D image representing the green component of a true color image.
blu_img A 2D image representing the blue component of a true color image.
red The red component of the color table.
grn The green component.
blu The blue component.
For correct appearance, rgb_img should be displayed in a graphics window with n colors allocated to it, where n is 256 under UNIX and OpenVMS, and 236 under Windows. For example:
WINDOW, 0, Colors = 256
TVLCT, red, grn, blu, 0
red
, grn
, and blu
are the values obtained from IMG_TRUE8.Then use the TV procedure to display the image:
TV, rgb_img
NOTE: On some systems it may be necessary to click in the image window to see the proper colors.
PRO img_demo1
winx = 477 winy = 512
red_img = BYTARR(winx, winy) grn_img = BYTARR(winx, winy) blu_img = BYTARR(winx, winy)
OPENR, 1, !Data_Dir + 'boulder_red.img' READU, 1, red_img CLOSE, 1 OPENR, 1, !Data_Dir + 'boulder_grn.img' READU, 1, grn_img CLOSE, 1 OPENR, 1, !Data_Dir + 'boulder_blu.img' READU, 1, blu_img CLOSE, 1
WINDOW, 0, Colors=256, XSize=winx, YSize=winy
Windows Users: Under Windows, change 256 to 236.
IMG_TRUE8, red_img, grn_img, blu_img, $ rgb_img,red, grn, blu TVLCT, red, grn, blu, 0 TV, rgb_img
END
.
UNIX and OpenVMS Users: To see an example using the same data, except displayed in true 24-bit color on a 24-bit X workstation, see the PV-WAVE User's Guide
.
UNIX and OpenVMS Users: For a comparison of pseudo- and true-color images, see the PV-WAVE User's Guide