Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
ResizeInterpolateCommand Constructor(Int32,Int32,ResizeInterpolateCommandType)
See Also  Example
Leadtools.ImageProcessing.Core Namespace > ResizeInterpolateCommand Class > ResizeInterpolateCommand Constructor : ResizeInterpolateCommand Constructor(Int32,Int32,ResizeInterpolateCommandType)



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.
Initializes a new instance of ResizeInterpolateCommand class with explicit parameters.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal width As Integer, _
   ByVal height As Integer, _
   ByVal resizeType As ResizeInterpolateCommandType _
)
Visual Basic (Usage)Copy Code
Dim width As Integer
Dim height As Integer
Dim resizeType As ResizeInterpolateCommandType
 
Dim instance As ResizeInterpolateCommand(width, height, resizeType)
C# 
public ResizeInterpolateCommand( 
   int width,
   int height,
   ResizeInterpolateCommandType resizeType
)
C++/CLI 
public:
ResizeInterpolateCommand( 
   int width,
   int height,
   ResizeInterpolateCommandType resizeType
)

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 BasicCopy 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")

   ' Prepare the command
   ' Resize the bitmap into 50 pixels x 50 pixels using the Bilinear algorithm.
   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