Changes the display size of the image of a specified index in buffer.
Namespace: Dynamsoft.DotNet.TWAINAssembly: DynamicDotNetTWAIN (in DynamicDotNetTWAIN.dll) Version: 3.0.0.0 (3.0.0.0)
Syntax
| C# |
|---|
public bool ChangeImageSize( short sImageIndex, int iNewWidth, int iNewHeight, DWTInterpolationMethod enumInterpolationMethod ) |
| Visual Basic |
|---|
Public Function ChangeImageSize ( _ sImageIndex As Short, _ iNewWidth As Integer, _ iNewHeight As Integer, _ enumInterpolationMethod As DWTInterpolationMethod _ ) As Boolean |
Parameters
- sImageIndex
- Type: System..::..Int16
Specifies the index of image in buffer. The index is 0-based.
- iNewWidth
- Type: System..::..Int32
Specifies the pixel width of the new image.
- iNewHeight
- Type: System..::..Int32
Specifies the pixel height of the new image.
- enumInterpolationMethod
- Type: Dynamsoft.DotNet.TWAIN.Enums..::..DWTInterpolationMethod
Specifies the method to do interpolation. DWTInterpolationMethod Allowed Values Interpolation Method 1 NearestNeighbor 2 Bilinear 3 Bicubic
Return Value
True indicates success. False indicates failure.
Remarks
ChangeImageSize() changes the display size of an image and replaces the original image with new one.
Exceptions
| Exception | Condition |
|---|---|
| Dynamsoft.DotNet.TWAIN..::..TwainException | When an error occurs and IfThrowException property is true, an exception will be thrown. When IfThrowException property is false, please check ErrorCode and ErrorString. |