←Select platform

ResizeInterpolateCommand Constructor(int,int,ResizeInterpolateCommandType)

Summary
Initializes a new instance of ResizeInterpolateCommand class with explicit parameters.
Syntax
C#
Objective-C
C++/CLI
Java
Python
- (instancetype)initWithWidth:(NSInteger)width height:(NSInteger)height type:(LTResizeInterpolateCommandType)resizeType NS_DESIGNATED_INITIALIZER; 
public ResizeInterpolateCommand( 
   int width, 
   int height, 
   ResizeInterpolateCommandType resizeType 
); 
public: 
ResizeInterpolateCommand(  
   int width, 
   int height, 
   ResizeInterpolateCommandType resizeType 
) 
__init__(self,width,height,resizeType) # Overloaded constructor 

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.

C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
 
public void ResizeConstructorExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample5.cmp")); 
 
   // 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); 
 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.11.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Core Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.