Resize
This function is a full-scale instrument for changing image size with a large variety of settings. The following parameters are used to adjust settings of this operation.
- size - new size
- units - size units (default - pixels)
- hdpi - horizontal resolution (default - 1)
- vdpi - vertical resolution (default - 1)
- res_units - resolution units (default - inches)
- keep_prop - keep original image proportions (default - yes)
- method - rescale method (default - bilinear)
- nozoom - don't zoom, if source image size smaller (default - no)
size
Size parameter is used to directly specify resulting image size.
size:<X Y>
X - horizontal size (whole positive number).
Y - vertical size (whole negative number).
The default value is: 0 0. If the default value is set, changes only DPI. Size of the image is not
changes.
Example:
units
Units parameter specifies units of sizes specified in size parameter. Its allowed values are:
- pixels - file size is specified in pixels.
- percents - file size is specified in percents of source image size.
The default value is: pixels.
Example:
hdpi
Hdpi parameter specifies horizontal resolution of the resulting image. It can accept a positive number from 1 to 4096.
Example:
vdpi
Vdpi parameter specifies vertical resolution of the resulting image. It can accept a positive number from 1 to 4096.
Example:
res_units
Res_units parameter specifies units of resolution specifies in hdpi and vdpi parameters. Its allowed values are:
- inches - image resolution is specified in pixels per inch.
- cm - image resolution is specified in pixels per centimeter.
The default value is: inches.
Example:
keep_prop
Use keep_prop parameter to tell the program whether image proportions should be kept when conveting it. Its allowed values are:
- yes - keep image proportions.
- no - do not keep image proportions.
The default value is: yes.
Example:
method
Method parameter specifies the interpolation algorithm used when increasing image size. Its allowed values are:
- nearest - fast but rough interpolation method.
- bilinear - this method provides smoother color transitions when increasing image size. If this value is active, conversion will take more time.
The default value is: bilinear.
Example:
nozoom
Nozoom parameter specifies whether it is necessary to increase image size if it is smaller than that specified in image settings. Its allowed values are:
- yes - do not increase smaller images.
- no - increase smaller images.
The default value is: no.
Example:
general example
ICPCL.exe -source "C:\Original files" -dest "C:\Converted files" -oper Resize size:500 100 units:pixels hdpi:72.000000 vdpi:72.000000 units:pixels res_units:cm keep_prop:no method:nearest nozoom:yes
tips
-
Resulting image size in measure units depends on specified image size in pixels or percents from the source resolution.
-
If keep_prop parameter is set to yes height or width of the resulting image may vary from that specified in size parameter, as it calculated from source image size.
-
If keep_prop parameter is set to no, proportions of the resulting image may be distorted.
-
Nozoom parameter should be set to yes only if you don't need to increase image size.
-
Bilinear interpolation method allows receiving images of higher quality, so it is preferable in most cases. Nearest method is used on slow computers or with very large images.