Crop()

Description

Crops an image of the specified index in buffer.

Syntax

.Crop(sImageIndex, left, top, right, bottom);

Parameters

<short> sImageIndex: specifies the index of image in buffer. The index is 0-based.
<int> left: specifies the x-coordinate of the upper-left corner of the rectangle. The unit is pixel.
<int> top: specifies the y-coordinate of the upper-left corner of the rectangle. The unit is pixel.
<int> right: specifies the x-coordinate of the lower-right corner of the rectangle. The unit is pixel.
<int> bottom: specifies the y-coordinate of the lower-right corner of the rectangle. The unit is pixel.

Return value

bool

true indicates success. false indicates failure.

Remarks

Crop() crops an image and replaces the original image with the cropped copy. If the application still needs the original image, use CropToClipboard() instead.

When false is returned, check ErrorCode or ErrorString for error information.

See Also

CropToClipboard()
OnImageAreaSelected
OnImageAreaDeSelected

Is this page helpful?

Leave a Reply

Your email address will not be published.