GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / RotateAngleBackColor Method
GdPicture image identifier.
Angle of rotation in degrees.
Color of the background. A suitable color value can be obtained by using the ARGB() method.
Example





In This Topic
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 ImageID As Integer, _
   ByVal Angle As Single, _
   ByVal BackColor As Color _
) As GdPictureStatus
public GdPictureStatus RotateAngleBackColor( 
   int ImageID,
   float Angle,
   Color BackColor
)
public function RotateAngleBackColor( 
    ImageID: Integer;
    Angle: Single;
    BackColor: Color
): GdPictureStatus; 
public function RotateAngleBackColor( 
   ImageID : int,
   Angle : float,
   BackColor : Color
) : GdPictureStatus;
public: GdPictureStatus RotateAngleBackColor( 
   int ImageID,
   float Angle,
   Color BackColor
) 
public:
GdPictureStatus RotateAngleBackColor( 
   int ImageID,
   float Angle,
   Color BackColor
) 

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.
Remarks

This method requires the Image Documents component to run.

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