The leading provider of version control solutions and TWAIN SDKs
  • Contact us









Crop Method

Description

Crops the image of a specified index in buffer.

ActiveX Edition Plug-in Edition Mac Edition
Since V4.1 Since V4.1 Since V6.4

Syntax

Boolean ObjectName. Crop(Short sImageIndex, Long left, Long top, long  right, long bottom)

Parameters

Short sImageIndex: specifies the index of image in buffer. The index is 0-based.

Long left: specifies the x-coordinate of the upper-left corner of the rectangle.

Long top: specifies the y-coordinate of the upper-left corner of the rectangle.

Long right: specifies the x-coordinate of the lower-right corner of the rectangle.

Long bottom: specifies the y-coordinate of the lower-right corner of the rectangle.

Return value

Boolean.

TRUE indicates success. FALSE indicates failure.

When an error occurs and IfThrowException property is TRUE, an exception will be thrown.

When FALSE is returned or an exception is thrown, check ErrorCode property and ErrorString property for error information.

Remarks

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

See Also

CropToClipboard(), RotateLeft(), RotateRight(), Flip(), Mirror(), GetImageSize(), ChangeImageSize(), ShowImageEditor(), ImageEditorWindowTitle property, ImageEditorIfReadonly property, ImageEditorIfEnableEnumerator property, OnImageAreaSelected Event, OnImageAreaDeSelected Event