resizeImage ( string orignalImage , mixed resizing , string _destinationImage , int _onlyIfHeightGreater , boolean _onlyIfWidthGreater ) : void
Resize an image
Example
Protect the partitionImage function in case of a very large image (because it would take a lot of memory):resizeImage(image,[4000,3000],null,4000,3000)
partitionImage(image)
Parameters
orignalImage
Path of the original image not resized
resizing
Defines how the image will be reduced. You can specify a number. If it is less than 1 the image will be reduced otherwise it will be enlarged.
Another option is to put an array [height, width] (ex: [4000,3000]). Thus a proportional reduction (or enlargement) will be made so that one side of the image is equal to the most demanding constraint (in the example if the image is 8000x8000, then it will be resized to the size 3000x3000, if it is 1000x1 then it will become 4000x4).
Another option is to put an array [height, width] (ex: [4000,3000]). Thus a proportional reduction (or enlargement) will be made so that one side of the image is equal to the most demanding constraint (in the example if the image is 8000x8000, then it will be resized to the size 3000x3000, if it is 1000x1 then it will become 4000x4).
_destinationImage (optional)
Path of the destination image (resized). If none, it it the same than the original image and it will erase it.
_onlyIfHeightGreater (optional)
If you specify this parameter, resizing will be done only if the height of the image is greater than this parameter.
_onlyIfWidthGreater (optional)
If you specify this parameter, resizing will be done only if the width of the image is greater than this parameter.