This method allows you to define an area on a raster image and create a new image and mask image from that area.
Parameters
red
The red component of the color painted outside
the area selected (from 0 to 255)
green
The green component of the color painted outside
the area selected (from 0 to 255)
blue
The blue component of the color painted outside
the area selected (from 0 to 255)
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The SelectImage method allows you to select an area on a raster image and create a new image and mask image from this selected area.
To execute the SelectImage method, set the image handle of the image in the Image property or the Layer(LayerNumber).Image property. The SelectImage method supports 1, 4, 8, 16, 24, and 32 bit images.
Before executing the SelectImage method, you must set the area on the image that will be affected.
- To use a mask image, set the SelectMode property to EffectMask. Set the mask image handle in the SourceMask property
- To process the total image, set the SelectMode property to EffectAll
- To process the polygonal area on the image, set the SelectMode property to EffectPolygon. Select the polygon by setting the appropriate coordinate values for the points of the polygon in the Point property
- To process an elliptical area on the image, set the SelectMode property to EffectEllipse. Select the ellipse by setting the appropriate values for the bounding rectangle in the Rect property
When the SelectMode property is set to EffectPolygon or EffectEllipse, the appropriate values must be set in the Inside property.
If successful the resulting raster image data is set in the LayerNumber property (the Image property or the Layer(LayerNumber).Image property. The resulting mask image is set in the DesinationMask property. The color defined by the Red, Green, and Blue parameters wil be painted in the resulting image in the area that is outside the selected area. The resulting mask image will be a black and white, 1 bit color image where the selected area is white and the area outside of the select area is black.
Note: To select a portion of an image, without creating a mask image, please use the CutRectImage method. This method is much faster than the SelectImage method.