createtruecolorimg.pro


Name:
createTrueColorImage
Syntax:
image = createTrueColorImage( sourceImage, red, green, blue, /flip, palette=palette )
Arguments:
sourceImage
Pointer to the image matrix to convert from greyscale to a true color image
red green blue
Three arrays of type int[256] with the red, green and blue values
palette
Instead of the single red/green/blue arrays an IDLgrPalette object can be passed.
If a palette object is given, parameters red/green/blue are ignored!
flip
Name of the grasshopper in 'Maja, the bee'
Alternatively a keyword which, when set, will cause the resulting image
to be rotated via rotate, 7
Return value:
a pointer to the newly allocated [3,*,*] result image
Description:
Create a true color image from an indexed image and a color palette
In case of errors the function returns a NULL pointer.
The function allocates new memory for the result image.
Known bugs: should provide some descriptive messages in case of errrors
Example code:
>  img   = indgen( 256, 256 )
>  red   = ingden( 256 )
>  green = indgen( 256 )
>  blue  = indgen( 256 )
>  tcimg = createTrueColorImg( ptr_new(img), red, green, blue, /flip )

Last modified: Mon Nov 29 13:30:04 2004