OIMAGE.$crop()
Function group | Execute on client | Platform(s) |
---|---|---|
OIMAGE | NO | All |
Syntax
OIMAGE.$crop(xImage, iX, iY, iWidth, iHeight, &xNewImage [,wParams=#NULL, &cErrorText])
Description
Crops xImage to iWidth by iHeight at iX and iY. Returns Boolean true and xNewImage on success, or false and cErrorText if an error occurs.
wParams is an optional row variable of parameters. The following columns can be specified in wParams:
sampler
The sampling method to be used when resizing. Either kOIMAGEsamplerBilinear or kOIMAGEsamplerNearestNeighbour. Defaults to kOIMAGEsamplerBilinear if this column is not present, or if wParams is omitted.gray
A Boolean that indicates if the new image is to be a grayscale image. Defaults to kFalse if this column is not present, or if wParams is omitted.quality
If the input image type is JPEG this column contains the JPEG image quality (1 to 100) of the new image. Defaults to 80 if this column is not present, or if wParams is omitted.