Resize
Resize image
1. imgResize lock:=1 unit:=pixel w:=50;
2. imgResize lock:=1 unit:=percent h:=120 interpolate:=resample;
3. imgResize lock:=0 w:=120 h:=130 interpolate:=normal img:=mat(1) oimg:=mat(2);
Please refer to the page for additional option switches when accessing the x-function from script
Input
int
Specifies whether or not to keep the aspect ratio of the original image.
This variable works with two other variables, w and h. It specifies the units for them.
Option list
Input/Output
double
Specifies the width of the output image.
Specifies the height of the output image.
Image
Specifies the source image to be manipulated. The default input is the active image.
Output
Specifies the output image. By default, it is the same as the input image. See the syntax here.
Specifies the interpolation method which is used when the image is resized.
This X-Function can be used to resize the input image to any size.
In this example, we use the imgResize function to resize the input image. We change its width to 300 pixels and its height to 200 pixels:
The resizing is implemented with L_SizeBitmap() function from LEADTOOLS Main API. Please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_SizeBitmap topic.
LEADTOOLS Main API Help file, Version 14
imgShear, imgTrim, imgCrop, imgScale, mdim