Crops the displayed image to the rectangle specified. The current selection rectangle is used if no rectangle is specified.
Ö | Imaging for Windows Professional Edition V1.0, V1.1, and V2.0 |
Imaging for Windows 95 and 98 | |
Imaging for Windows NT 4.0 |
Image Edit control
object.Crop [Left,Top,Width,Height]
Parameter | Data Type | Setting |
Left | Long | The upper-left corner of the rectangle in pixel coordinates of the displayed image |
Top | Long | The top of the rectangle in pixel coordinates of the displayed image |
Width | Long | The width of the rectangle in pixels |
Height | Long | The height of the rectangle in pixels |
None
The Display method must be invoked prior to calling this method.
If the Crop method is invoked without parameters after an end user draws a selection rectangle, the image data outside of the selection rectangle is cropped.
The Crop method generates an error if it is invoked without parameters and without an end user drawing a selection rectangle.
After invoking the Crop method, the Save, SaveAs, or SavePage method must be invoked to save the altered image.
Invoking the Crop method sets the ImageModified property to True.