RotateFlipCommand Class
Summary
Rotates and flips the image.
Syntax
C#
VB
Objective-C
C++
Java
public class RotateFlipCommand : RasterCommand, IInPlaceDataCommand
@interface LTKernelRotateFlipCommand : LTRasterCommand
public class RotateFlipCommand extends RasterCommand
Example
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Kernel;
public void CropCommandExample()
{
using (RasterCodecs codecs = new RasterCodecs())
{
// Load an image
using (RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp")))
{
// Prepare the command
RotateFlipCommand command = new RotateFlipCommand(RotateFlipType.RotateNoneFlipX);
// Run the command
command.Run(image);
codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.bmp"), RasterImageFormat.Bmp, 24);
}
}
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS21\Resources\Images";
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing.Kernel
Public Sub CopyImageCommandExample()
Using codecs As RasterCodecs = New RasterCodecs()
Using image As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp"))
' Prepare the command
Dim command As RotateFlipCommand = New RotateFlipCommand(RotateFlipType.RotateNoneFlipX)
' Run the command
command.Run(image)
codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.bmp"), RasterImageFormat.Bmp, 24)
End Using
End Using
End Sub
Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\LEADTOOLS21\Resources\Images"
End Class