Marblecore Imaging Library Documentation

Documentation Introduction
Documentation / Marblecore Imaging / Methods / Skew

Skew method

Performs a skew transformation on the current image.

Syntax

Boolean Skew(nLeftTopX As Number, nLeftTopY As Number, nLeftBottomX As Number, nLeftBottomY As Number, nRightTopX As Number, nRightTopY As Number, nRightBottomX As Number, nRightBottomY As Number, nBackgroundColor As Number, nBackgroundOpacity As Number)

Return value

Returns true if the function succeeded.

Parameters

ParameterTypeRequiredDescription
nLeftTopXNumberYesSpecifies the horizontal left top coordinate for the transformation.
nLeftTopYNumberYesSpecifies the vertical left top coordinate for the transformation.
nLeftBottomXNumberNoSpecifies the horizontal left bottom coordinate for the transformation.
nLeftBottomYNumberNoSpecifies the vertical left bottom coordinate for the transformation.
nRightTopXNumberNoSpecifies the horizontal right top coordinate for the transformation.
nRightTopYNumberNoSpecifies the vertical right top coordinate for the transformation.
nRightBottomXNumberNoSpecifies the horizontal right bottom coordinate for the transformation.
nRightBottomYNumberNoSpecifies the vertical right bottom coordinate for the transformation.
nBackgroundColorNumberNoOptional parameter containing the background color. If no color is specified the current background color will be used.
nBackgroundOpacityNumberNoOptional parameter containing the background opacity.

Example

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.
 
before
after
 
1 // Load the specified image in memory
2 MarblecoreImaging.LoadFromFile("example-skew-before.jpg");
3 
4 // Execute the operation
5 MarblecoreImaging.Skew(60, 0, 0, 533, 760, 60, 750, 463);
6 
7 // Save the modified image to the specified file
8 MarblecoreImaging.SaveToFile("example-skew-after.jpg");

Category

Transformations

See also

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