GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / Rotate Method
GdPicture image identifier.
A member of the RotateFlipType enumeration.
Example





In This Topic
Rotate Method (GdPictureImaging)
In This Topic
Rotates clock-wise or flips a GdPicture image.
Syntax
'Declaration
 
Public Function Rotate( _
   ByVal ImageID As Integer, _
   ByVal Rotation As RotateFlipType _
) As GdPictureStatus
public GdPictureStatus Rotate( 
   int ImageID,
   RotateFlipType Rotation
)
public function Rotate( 
    ImageID: Integer;
    Rotation: RotateFlipType
): GdPictureStatus; 
public function Rotate( 
   ImageID : int,
   Rotation : RotateFlipType
) : GdPictureStatus;
public: GdPictureStatus Rotate( 
   int ImageID,
   RotateFlipType Rotation
) 
public:
GdPictureStatus Rotate( 
   int ImageID,
   RotateFlipType Rotation
) 

Parameters

ImageID
GdPicture image identifier.
Rotation
A member of the RotateFlipType enumeration.

Return Value

A member of the GdPictureStatus enumeration.
Remarks

This method requires the Image Documents component to run.

Example
Rotating a jpeg 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.jpg", true);
 
    // Rotate the image by 90°.
    gdpictureImaging.Rotate(imageID, RotateFlipType.Rotate90FlipNone);
    gdpictureImaging.SaveAsJPEG(imageID, "image.jpg", 75);
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also