GdPicture.NET Reference Guide
RotateAnglePreserveDimensionsCenterBackColor Method
Example 





GdPicture14 Namespace > GdPictureImaging Class : RotateAnglePreserveDimensionsCenterBackColor 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.
Rotates clockwise a GdPicture by a specific angle from the center with custom back color keeping the originals width and height of the picture.
Syntax
'Declaration
 
Public Function RotateAnglePreserveDimensionsCenterBackColor( _
   ByVal ImageID As Integer, _
   ByVal Angle As Single, _
   ByVal BackColor As Color _
) As GdPictureStatus
public GdPictureStatus RotateAnglePreserveDimensionsCenterBackColor( 
   int ImageID,
   float Angle,
   Color BackColor
)
public function RotateAnglePreserveDimensionsCenterBackColor( 
    ImageID: Integer;
    Angle: Single;
    BackColor: Color
): GdPictureStatus; 
public function RotateAnglePreserveDimensionsCenterBackColor( 
   ImageID : int,
   Angle : float,
   BackColor : Color
) : GdPictureStatus;
public: GdPictureStatus RotateAnglePreserveDimensionsCenterBackColor( 
   int ImageID,
   float Angle,
   Color BackColor
) 
public:
GdPictureStatus RotateAnglePreserveDimensionsCenterBackColor( 
   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.
Example
Rotating image from the center with specifying black color and perserving dimensions.
Dim oGdPictureImaging As New oGdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   oGdPictureImaging.RotateAnglePreserveDimensionsCenterBackColor(ImageID, 30.0, oGdPictureImaging.ARGB(255, 0, 0, 0))
   oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
ARGB(Byte,Byte,Byte) Method