Rotate2 Method
Syntax
CWIMAQVision.Rotate2 SourceImage, DestImage, Angle [, FillValue = 0.0] [, InterpolationMethod = cwimaqInterpolateZeroOrder] [, MaintainSize = True]
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Rotates an image counterclockwise.
Remarks
Use this method with U8, I16, SGL, and RGB32 images.
Parameters
SourceImage As CWIMAQImage
The image to rotate.
DestImage As CWIMAQImage
The resulting image.
Angle As Single
The angle, in degrees, to rotate the image.
FillValue As Variant
[Optional] The value with which the method fills the image pixels not covered by the rotated image.
This parameter has a default value of 0.0.
InterpolationMethod As Variant
[Optional] The method of interpolation. Valid interpolation methods for rotation are cwimaqInterpolateZeroOrder and cwimaqInterpolateBiLinear.
This parameter has a default value of cwimaqInterpolateZeroOrder.
MaintainSize As Variant
[Optional] Whether the rotated image should have the same size as the source image.
This parameter has a default value of True.
Example
Private Sub Run_Click() Dim i As New CWIMAQImage ' Rotate the image in Viewer1 by 45 degrees. ' Store the result in i. CWIMAQVision1.Rotate2 CWIMAQViewer1.Image, i, 45, 128, _ cwimaqInterpolateBiLinear CWIMAQViewer2.Attach i End Sub