<- Back to CNS Image function list
CNSImage_Crop
- Description
The CNSImage_Crop function allows you to create a new image based on part of an image. In other words, it takes an image, crops it to your specifications and then returns it to you.
- Return Type
- Container
- Format
- CNSImage_Crop ( Image ; Top ; Left ; Bottom ; Right )
- Required Parameters
- Image
A Container field that contains an Image or a Path and File Name to an Image you want to Crop.
- Top
The Top pixel coordinates of the Top, Left corner of the Crop rectangle.
- Left
The Left pixel coordinates of the Top, Left corner of the Crop rectangle.
- Bottom
The Bottom pixel coordinates of the Bottom, Right corner of the Crop rectangle.
- Right
The Right pixel coordinates of the Bottom, Right corner of the Crop rectangle.
- Image
- Related Items
- CNSImage_Resize, CNSImage_Transform
- Example
Code:
CNSImage_Crop( MyImage ; 0 ; 0 ; 100 ; 100 )Result:
Returns a 100 square pixel area from the image in the "MyImage" container.