This method removes "red eye" from images by converting reddish colors within the selected area to another specified color.

[Visual Basic] Public Function RemoveRedEye(red As Byte, green As Byte, blue As Byte, error As Integer) As Boolean
[C#] public bool RemoveRedEye(byte red, byte green, byte blue, int error);

Parameters

red
   Sets the red component for the specified color after the red eye removal (from 0 to 255)

green
   Sets the green component for the specified color after the red eye removal (from 0 to 255)

blue
   Sets the blue component for the specified color after the red eye removal (from 0 to 255)

error
   Sets a margin of error for converting colors within the selected area. Any colors falling outside this margin of error will be converted to the color specifed by the Red, Green, and Blue parameters (from 0 to 255)

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The RemoveRedEye method removes "red eye" from images by converting colors within the selected area to another specified color. The error parameter sets a margin of error for colors within the selected area. Any color whose red value falls outside this margin of error will be converted to the color specifed by the Red, Green and Blue parameters. As the Error parameter value increases only colors closer to pure red will be converted. As the Error parameter decreases, a wider and wider range of "reddish" colors will be converted.

To execute the RemoveRedEye method, set the image handle of the image in the Image property or the Layer(LayerNumber).Image property. The RemoveRedEye method supports 16, 24, and 32 bit images.

Before executing the RemoveRedEye method, you must set the area on the image that will be affected. There are 4 ways to do this.

  1. To use a mask image, set the SelectMode property to EffectMask. Set the mask image handle in the SourceMask property
  2. To process the total image, set the SelectMode property to EffectAll
  3. 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
  4. 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 the RemoveRedEye method is successful and the DestinationAsImageKitImage property is True, the resulting image will be set in the Image property or in the Layer(LayerNumber).Image property, according to the value set in the LayerNumber property.

If the RemoveRedEye method is successful and the DestinationAsImageKitImage property is False, the resulting image will be set in the DestinationImage property.

See Also

ImageKit.Effect Members | Newtone.ImageKit.Wpf.ImageKit

The ImageKit WPF is created by Newtone Corporation