Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.10
ResizeInterpolateCommand Class
See Also  Members   Example 
Leadtools.ImageProcessing.Core Namespace : ResizeInterpolateCommand Class




Applies different kinds of algorithms on images to resize them into the desired size.

Syntax

Visual Basic (Declaration) 
Public Class ResizeInterpolateCommand 
   Inherits RasterCommand
   Implements IRasterCommand 
Visual Basic (Usage)Copy Code
Dim instance As ResizeInterpolateCommand
C# 
public class ResizeInterpolateCommand : RasterCommand, IRasterCommand  
Managed Extensions for C++ 
public __gc class ResizeInterpolateCommand : public RasterCommand, IRasterCommand  
C++/CLI 
public ref class ResizeInterpolateCommand : public RasterCommand, IRasterCommand  

Example

Visual BasicCopy Code
ImageProcessing.Core.ResizeInterpolateCommand
   Public Sub ResizeCommandExample()
      RasterCodecs.Startup()
      Dim codecs As New RasterCodecs()
      codecs.ThrowExceptionsOnInvalidImages = True

      Dim leadImage As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg")

      ' Prepare the command
      Dim command As ResizeInterpolateCommand = New ResizeInterpolateCommand()

      ' Resize the bitmap into 50 pixels x 50 pixels using the Bilinear algorithm.
      command.Width = 50
      command.Height = 50
      command.ResizeType = ResizeInterpolateCommandType.Bilinear
      command.Run(leadImage)

      RasterCodecs.Shutdown()
   End Sub
C#Copy Code
ImageProcessing.Core.ResizeInterpolateCommand 
      public void ResizeCommandExample() 
      { 
         // Load an image 
         RasterCodecs.Startup(); 
         RasterCodecs codecs = new RasterCodecs(); 
         codecs.ThrowExceptionsOnInvalidImages = true; 
 
         RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg"); 
 
         // Prepare the command 
         ResizeInterpolateCommand command = new ResizeInterpolateCommand(); 
 
         // Resize the bitmap into 50 pixels x 50 pixels using the Bilinear algorithm. 
         command.Width = 50; 
         command.Height = 50; 
         command.ResizeType = ResizeInterpolateCommandType.Bilinear; 
         command.Run(image); 
 
         RasterCodecs.Shutdown(); 
      }

Remarks

  • This command keeps the same bitmap handle and resizes the bitmap that it references.
  • This command supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical Toolkits.
  • This command does not support 32-bit grayscale images.

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.Core.ResizeInterpolateCommand

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