GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / AddBorderBottom Method / AddBorderBottom(Int32,Int32,GdPictureColor) 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 ARGB() method.
Example





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

Parameters

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

Return Value

A member of the GdPictureStatus enumeration.
Example
Adding the border to the bottom 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 bottom of the image.
    int borderHeight = 10;
    Color borderColor = Color.FromArgb(0, 255, 0);
    gdpictureImaging.AddBorderBottom(imageID, borderHeight, borderColor);
    gdpictureImaging.SaveAsPNG(imageID, "image.png");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also