OIMAGE.$transform()

Function group Execute on client Platform(s)
OIMAGE NO All

Syntax

OIMAGE.$transform(xImage,&xNewImage[,wParams=#NULL,&cErrorText])

Description

Perform a transformation on the image xImage. Returns Boolean true and xNewImage for success, or false and cErrorText if an error occurs.

xImage and xNewImage are both binary variables. xImage must be a JPEG or PNG image. xNewImage has the same type as xImage. You can use the same binary variable for both parameters if you want to replace the original image.

wParams is an optional row variable of parameters. The following columns can be specified in wParams:

  1. transform
    The transformation to be performed, a kOIMAGEtransform… constant, see below. Defaults to kOIMAGEtransformRotate90 if this column is not present, or if wParams is omitted.

  2. 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.

Valid transformations are:

Constant Description
kOIMAGEtransformRotate90 Rotates the image 90 degrees clockwise; the default
kOIMAGEtransformRotate180 Rotates the image 180 degrees
kOIMAGEtransformRotate270 Rotates the image 270 degrees clockwise
kOIMAGEtransformFlipLeftRight Flips the image on the left to right axis
kOIMAGEtransformFlipTopBottom Flips the image on the top to bottom axis
kOIMAGEtransformTranspose Transposes the image, i.e. flips the image along a 45 degree axis, from top-left corner to bottom-right corner

cErrorText The error text returned from the function.