GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / SwapColor Method / SwapColor(Int32,Color,Color,Single) Method
GdPicture image identifier.
Color to replace. A suitable color value can be obtained by using the ARGB() method.
Color of replacement. A suitable color value can be obtained by using the ARGB() method.
Percentage threshold between 0 and 100.





In This Topic
SwapColor(Int32,Color,Color,Single) Method
In This Topic
Replaces one color by another on a GdPicture image or into an area of a GdPicture image defined by SetROI() method. This method takes a percentage threshold parameter regarding the color to replace. Ie: A threshold value of 90 means that all the color values which are within 90% of the color value to replace will be considered.
Syntax
'Declaration
 
Public Overloads Function SwapColor( _
   ByVal ImageID As Integer, _
   ByVal ColorSrc As Color, _
   ByVal ColorDst As Color, _
   ByVal Threshold As Single _
) As GdPictureStatus
public GdPictureStatus SwapColor( 
   int ImageID,
   Color ColorSrc,
   Color ColorDst,
   float Threshold
)
public function SwapColor( 
    ImageID: Integer;
    ColorSrc: Color;
    ColorDst: Color;
    Threshold: Single
): GdPictureStatus; 
public function SwapColor( 
   ImageID : int,
   ColorSrc : Color,
   ColorDst : Color,
   Threshold : float
) : GdPictureStatus;
public: GdPictureStatus SwapColor( 
   int ImageID,
   Color ColorSrc,
   Color ColorDst,
   float Threshold
) 
public:
GdPictureStatus SwapColor( 
   int ImageID,
   Color ColorSrc,
   Color ColorDst,
   float Threshold
) 

Parameters

ImageID
GdPicture image identifier.
ColorSrc
Color to replace. A suitable color value can be obtained by using the ARGB() method.
ColorDst
Color of replacement. A suitable color value can be obtained by using the ARGB() method.
Threshold
Percentage threshold between 0 and 100.

Return Value

A member of the GdPictureStatus enumeration.
See Also