GdPicture.NET Reference Guide
SwapColorsRGBtoBGR Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : SwapColorsRGBtoBGR Method
GdPicture Image Identifier.
Swaps the color components (RGB - > BGR) of a GdPicture image or of an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Function SwapColorsRGBtoBGR( _
   ByVal ImageID As Integer _
) As GdPictureStatus
public GdPictureStatus SwapColorsRGBtoBGR( 
   int ImageID
)
public function SwapColorsRGBtoBGR( 
    ImageID: Integer
): GdPictureStatus; 
public function SwapColorsRGBtoBGR( 
   ImageID : int
) : GdPictureStatus;
public: GdPictureStatus SwapColorsRGBtoBGR( 
   int ImageID
) 
public:
GdPictureStatus SwapColorsRGBtoBGR( 
   int ImageID
) 

Parameters

ImageID
GdPicture Image Identifier.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
This method is used in the "Image Processing" Demo. Please check appendix "Finding Demo Applications" for more information.
Example
Swapping RGB color components to BGR.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   oGdPictureImaging.SwapColorsRGBtoBGR(ImageID)
   oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
SetROI Method
ResetROI Method