CImageView:GetImage
The GetImage method returns a new CImage object for the image currently displayed in the CImageView (i.e., in the image view window).
CImage = CImageView:GetImage() CImage = CImageView:GetImage( nIndex ) where |
nIndex is the image to select, in the range 1 to Count. If not passed, the current image is selected.
CImage is the CImage object at the specified nIndex
On success, this method returns a new CImage object. On failure, nil is returned.
This method automatically creates a new CImage object. You do not need to use CImage:new to create an object.
Assume that an image is displayed in a CImageView named V. The following script crops the current displayed image at the limits of the image cursor:
|
-- attach the displayed image to the CImage |
|
-- get the cursor extent as a CRect |
|
--crop the image to the image cursor |