![]() ![]() |
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( nIndex=nil ) |
The optional
parameter nIndex is the image
to select, in the range 1 to Count.
If nIndex is not specified is set to nil, the current image is
selected.
On success,
this method returns a new CImage object.
On failure,
this method returns nil.
Assume that an image is displayed in a CImageView named V. The following script fragment crops the current displayed image at the limits of the image cursor:
I = V:GetImage() |
-- attach the displayed image to the CImage |
R = V:GetCursorRect() |
-- get the cursor extent as a CRect |
I:Crop( R ) |
--crop the image to the image cursor |