AddBorderRight(Int32,Int32,GdPictureColor) Method
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 ARGB() method.
Return Value
A member of the GdPictureStatus enumeration.
Adding the border to the right 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 blue border to the right of the image.
int borderHeight = 10;
Color borderColor = Color.FromArgb(0, 0, 255);
gdpictureImaging.AddBorderTop(imageID, borderHeight, borderColor);
gdpictureImaging.SaveAsPNG(imageID, "image.png");
gdpictureImaging.ReleaseGdPictureImage(imageID);
}