Marblecore Imaging Library Documentation

Documentation Introduction
Documentation / Marblecore Imaging / Methods / Rotate

Rotate method

Rotates the image with the specified number of degrees with high precision and quality (rotate by shear).


Boolean Rotate(nDegrees As Number (floating point), nRotation As Rotation, nBackgroundColor As Number, nBackgroundOpacity As Number)

Return value

Returns true if the function succeeded.


nDegreesNumber (floating point)YesSpecifies the number of the degrees to rotate. Can be any value between -360.0 and 360.0.
nRotationRotation (Enumeration)NoSpecifies the rotation method.
nBackgroundColorNumberNoOptional parameter which specifies the background color. If omitted, the default background color will be used.
nBackgroundOpacityNumberNoOptional parameter which specifies the opacity of the background color.


The example below shows the effect of this method and how to use it. You can slide the marker in the before/after picture to see the difference. If you take a look at the example code, assume there is a reference to the Marblecore Imaging object with the name 'MarblecoreImaging'. Transparent parts of the image are displayed using a checkerboard pattern.
1 // Load the specified image in memory
2 MarblecoreImaging.LoadFromFile("example-rotate-before.jpg");
4 // Execute the operation
5 MarblecoreImaging.Rotate(5, "Expand");
7 // Save the modified image to the specified file
8 MarblecoreImaging.SaveToFile("example-rotate-after.jpg");



See also

Clear | Crop | Expand | FlipHorizontal | FlipVertical | Opacity | Resize | RotateLeft | RotateRight | RoundEdges | Shear | Shrink | Skew | Straighten | Thumbnail