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





In This Topic
GdPicture14 Namespace / GdPictureImaging Class / AddBorders Method / AddBorders(Int32,Int32,Color) Method

AddBorders(Int32,Int32,Color) Method

In This Topic
Adds borders around a GdPicture image.
Syntax
'Declaration

 

Public Overloads Function AddBorders( _

   ByVal ImageID As Integer, _

   ByVal BorderWidth As Integer, _

   ByVal BorderColor As Color _

) As GdPictureStatus
public GdPictureStatus AddBorders( 

   int ImageID,

   int BorderWidth,

   Color BorderColor

)
public function AddBorders( 

    ImageID: Integer;

    BorderWidth: Integer;

    BorderColor: Color

): GdPictureStatus; 
public function AddBorders( 

   ImageID : int,

   BorderWidth : int,

   BorderColor : Color

) : GdPictureStatus;
public: GdPictureStatus AddBorders( 

   int ImageID,

   int BorderWidth,

   Color BorderColor

) 
public:

GdPictureStatus AddBorders( 

   int ImageID,

   int BorderWidth,

   Color BorderColor

) 

Parameters

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

Return Value

A member of the GdPictureStatus enumeration.
Example
Adding borders around 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 blue borders around the image.

    int borderWidth = 10;

    Color borderColor = gdpictureImaging.ARGB(255, 0, 0, 255);

    gdpictureImaging.AddBorders(imageID, borderWidth, borderColor);

    gdpictureImaging.SaveAsPNG(imageID, "image.png");

    gdpictureImaging.ReleaseGdPictureImage(imageID);

}
See Also