GdPicture.NET Reference Guide
ARGBI Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : ARGBI Method
The value for the alpha component also known as a transparency. Use the value between 0 (full transparency) and 255 (full opacity).
The value for the red component. Use the value between 0 and 255.
The value for the green component. Use the value between 0 and 255.
The value for the blue component. Use the value between 0 and 255.
Returns a 32-bit value, that represents a color composed from a specified set of alpha, red, green and blue color components.
Syntax
'Declaration
 
Public Function ARGBI( _
   ByVal Alpha As Byte, _
   ByVal Red As Byte, _
   ByVal Green As Byte, _
   ByVal Blue As Byte _
) As Integer
public int ARGBI( 
   byte Alpha,
   byte Red,
   byte Green,
   byte Blue
)
public function ARGBI( 
    Alpha: Byte;
    Red: Byte;
    Green: Byte;
    Blue: Byte
): Integer; 
public function ARGBI( 
   Alpha : byte,
   Red : byte,
   Green : byte,
   Blue : byte
) : int;
public: int ARGBI( 
   byte Alpha,
   byte Red,
   byte Green,
   byte Blue
) 
public:
int ARGBI( 
   byte Alpha,
   byte Red,
   byte Green,
   byte Blue
) 

Parameters

Alpha
The value for the alpha component also known as a transparency. Use the value between 0 (full transparency) and 255 (full opacity).
Red
The value for the red component. Use the value between 0 and 255.
Green
The value for the green component. Use the value between 0 and 255.
Blue
The value for the blue component. Use the value between 0 and 255.

Return Value

A 32-bit value representing a required color.
Example
How to use this method to specify color for painting.
Dim caption As String = "Example: ARGBI"
Using oImage As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = oImage.CreateGdPictureImageFromFile("input.png")
    If oImage.GetStat() = GdPictureStatus.OK Then
        If oImage.ClearImage(imageID, oImage.ARGBI(255, 0, 0, 255)) = GdPictureStatus.OK Then
            If oImage.SaveAsPNG(imageID, "output.png") = GdPictureStatus.OK Then
                MessageBox.Show("The image has been saved successfully.", caption)
            Else
                MessageBox.Show("The image can't be saved. Status: " + oImage.GetStat().ToString(), caption)
            End If
        Else
            MessageBox.Show("The image can't be painted. Status: " + oImage.GetStat().ToString(), caption)
        End If
        oImage.ReleaseGdPictureImage(imageID)
    Else
        MessageBox.Show("The image can't be created. Status: " + oImage.GetStat().ToString(), caption)
    End If
End Using
string caption = "Example: ARGBI";
using (GdPictureImaging oImage = new GdPictureImaging())
{
    int imageID = oImage.CreateGdPictureImageFromFile("input.png");
    if (oImage.GetStat() == GdPictureStatus.OK)
    {
        if (oImage.ClearImage(imageID, oImage.ARGBI(255, 0, 0, 255)) == GdPictureStatus.OK)
        {
            if (oImage.SaveAsPNG(imageID, "output.png") == GdPictureStatus.OK)
                MessageBox.Show("The image has been saved successfully.", caption);
            else
                MessageBox.Show("The image can't be saved. Status: " + oImage.GetStat().ToString(), caption);
        }
        else
            MessageBox.Show("The image can't be painted. Status: " + oImage.GetStat().ToString(), caption);
        oImage.ReleaseGdPictureImage(imageID);
    }
    else
        MessageBox.Show("The image can't be created. Status: " + oImage.GetStat().ToString(), caption);
}
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
ARGB(Byte,Byte,Byte,Byte) Method