RotateAngleBackColor Method (GdPictureImaging)
In This Topic
Rotates clockwise a GdPicture by a specific angle and a custom back color.
Syntax
'Declaration
Public Function RotateAngleBackColor( _
ByVal As Integer, _
ByVal As Single, _
ByVal As Color _
) As GdPictureStatus
public GdPictureStatus RotateAngleBackColor(
int ,
float ,
Color
)
public function RotateAngleBackColor(
: Integer;
: Single;
: Color
): GdPictureStatus;
public function RotateAngleBackColor(
: int,
: float,
: Color
) : GdPictureStatus;
public: GdPictureStatus RotateAngleBackColor(
int ,
float ,
Color
)
public:
GdPictureStatus RotateAngleBackColor(
int ,
float ,
Color
)
Parameters
- ImageID
- GdPicture image identifier.
- Angle
- Angle of rotation in degrees.
- BackColor
- Color of the background. A suitable color value can be obtained by using the ARGB() method.
Return Value
A member of the GdPictureStatus enumeration.
Example
Rotating a jpeg image by 75° using a light blue background color.
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.jpg", true);
// Rotate the image by 75° with a light blue background color.
gdpictureImaging.RotateAngleBackColor(imageID, 75, Color.LightBlue);
gdpictureImaging.SaveAsJPEG(imageID, "image.jpg", 75);
gdpictureImaging.ReleaseGdPictureImage(imageID);
}
Example
Rotating a jpeg image by 75° using a light blue background color.
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.jpg", true);
// Rotate the image by 75° with a light blue background color.
gdpictureImaging.RotateAngleBackColor(imageID, 75, Color.LightBlue);
gdpictureImaging.SaveAsJPEG(imageID, "image.jpg", 75);
gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also