Initializes a new instance of
ResizeInterpolateCommand class with explicit parameters.
Syntax
Parameters
- width
- Value that represents the desired image's width in pixels.
- height
- Value that represents the desired image's height in pixels.
- resizeType
- Value that represents the algorithm type used in resizing the image. For possible values refer to ResizeInterpolateCommandType.
Example
Run the ResizeCommand on an image.
Visual Basic | Copy Code |
---|
Public Sub ResizeConstructorExample()
RasterCodecs.Startup()
Dim codecs As New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim leadImage As RasterImage = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Master.jpg")
Dim command As ResizeInterpolateCommand = New ResizeInterpolateCommand(50, 50, ResizeInterpolateCommandType.Bilinear)
command.Run(leadImage)
RasterCodecs.Shutdown()
End Sub |
C# | Copy Code |
---|
public void ResizeConstructorExample() { // Load an image RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Master.jpg"); // Prepare the command // Resize the bitmap into 50 pixels x 50 pixels using the Bilinear algorithm. ResizeInterpolateCommand command = new ResizeInterpolateCommand(50, 50, ResizeInterpolateCommandType.Bilinear); command.Run(image); RasterCodecs.Shutdown(); } |
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also