ImgGetRedChannel

Top  Previous  Next

Prototype

 

IntImage:=ImgGetRedChannel(intColorImageHandle)

 

Description

 

Produces a grayscale image getting the red channel from a truecolor image.

 

Parameters

 

intColorImageHandle: integer value corresponding to the color image handle.

 

Returned value

 

IntImage: integer value corresponding to the resulting image handle.

 

Notes

 

None.

 

Example

 

// Get R, G and B layers from color image

RedLayer:=ImgGetRedChannel(_CurrentImage);

GreenLayer:=ImgGetGreenChannel(_CurrentImage);

BlueLayer:=ImgGetBlueChannel(_CurrentImage);

 

// Increase contrast just on green layer

ImgAdjustContrast(GreenLayer,30);

 

// Rebuild color image from layers

NewImage:=ImgMergeRGBChannels(RedLayer,GreenLayer,BlueLayer);

 

// Delete R, G and B layers from memory

ImgDelete(RedLayer);

ImgDelete(GreenLayer);

ImgDelete(BlueLayer);

 

// Substute to original image the new processed image

_CurrentImage:=NewImage;