CNSImage_Transform
- Description
This function applies a Transformation Rectange/Matrix to an image. This function can be used for something as simple as resizing an image or for something more complex like resizing, rotating, and skewing an image.
- Return Type
- Container
- Format
- CNSImage_Transform ( Image ; LeftTopX ; LeftTopY ; RightTopX ; RightTopY ; RightBottomX ; RightBottomY ; LeftBottomX ; LeftBottomY )
- Required Parameters
- Image
A Container field that contains an Image or a Path and File Name to an Image you want to Transform.
- LeftTopX
The new X pixel coordinate of the Left, Top corner of the Image.
- LeftTopY
The new Y pixel coordinate of the Left, Top corner of the Image.
- RightTopX
The new X pixel coordinate of the Right, Top corner of the Image.
- RightTopY
The new Y pixel coordinate of the Right, Top corner of the Image.
- RightBottomX
The new X pixel coordinate of the Right, Bottom corner of the Image.
- RightBottomY
The new Y pixel coordinate of the Right, Bottom corner of the Image.
- LeftBottomX
The new X pixel coordinate of the Left, Bottom corner of the Image.
- LeftBottomY
The new Y pixel coordinate of the Left, Bottom corner of the Image.
- Image
- Related Items
- CNSImage_Crop, CNSImage_Reflect, CNSImage_Resize, CNSImage_Rotate
- Example
Code:
CNSImage_Transform( Image ; 0 ; 0 ; 200 ; 0 ; 200 ; 500 ; 0 ; 500 )Result:
Transforms the image in the "Image" field. (Depending on the image, this would likely squish the image horizontally. For an example of this function in action, view the "Transform" example.)