Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / AddBorderLeft Method / AddBorderLeft(Int32,Int32,Int32) Method
GdPicture image identifier.
The width of the border in pixel.
Color of the border. A suitable color value can be obtained by using the ARGBI() method.
Example





In This Topic
    AddBorderLeft(Int32,Int32,Int32) Method
    In This Topic
    Adds border to the left of a GdPicture image.
    Syntax
    'Declaration
     
    
    Public Overloads Function AddBorderLeft( _
       ByVal ImageID As Integer, _
       ByVal BorderWidth As Integer, _
       ByVal BorderColor As Integer _
    ) As GdPictureStatus
    public GdPictureStatus AddBorderLeft( 
       int ImageID,
       int BorderWidth,
       int BorderColor
    )
    public function AddBorderLeft( 
        ImageID: Integer;
        BorderWidth: Integer;
        BorderColor: Integer
    ): GdPictureStatus; 
    public function AddBorderLeft( 
       ImageID : int,
       BorderWidth : int,
       BorderColor : int
    ) : GdPictureStatus;
    public: GdPictureStatus AddBorderLeft( 
       int ImageID,
       int BorderWidth,
       int BorderColor
    ) 
    public:
    GdPictureStatus AddBorderLeft( 
       int ImageID,
       int BorderWidth,
       int BorderColor
    ) 

    Parameters

    ImageID
    GdPicture image identifier.
    BorderWidth
    The width of the border in pixel.
    BorderColor
    Color of the border. A suitable color value can be obtained by using the ARGBI() method.

    Return Value

    A member of the GdPictureStatus enumeration.
    Example
    Adding the border to the left of a GdPicture image.
    using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
    {
        // LoadInMemory parameter is set to true in order to be able to update the input file.
        int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.png", true);
     
        // Add a 10 pixels green border at the left of the image.
        int borderHeight = 10;
        int borderColor = gdpictureImaging.ARGBI(255, 0, 255, 0);
        gdpictureImaging.AddBorderLeft(imageID, borderHeight, borderColor);
        gdpictureImaging.SaveAsPNG(imageID, "image.png");
        gdpictureImaging.ReleaseGdPictureImage(imageID);
    }
    See Also