CImage:Crop
The Crop method trims a rectangular subimage out of the image. This transformation preserves the world coordinate calibration of the image, if one exists.
bResult = CImage:Crop( CRect ) |
On success, this method returns true
On failure, this method returns false.
The crop region is passed as a CRect object containing the min and max x and y limits of the sub-image. These pixel coordinates are 1-based, meaning that pixel (1,) is at the origin of the image.
Assume that an image is displayed in a CImageView named V. The following script crops a subimage from the image cursor:
|
-- attach the displayed image to the CImage |
|
-- get the cursor extent as a CRect |
|
--crop the image to the image cursor |
CImage class, CImageView , CRect class
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.