Skip to main content
Version: v6.5.0

Image Cropping

Command Description

Crop the specified area of the image file

Command Prototype

objImg = Picture.Crop(objImg, iLeft, iTop, iRight, iBottom)

Command parameter

parametermandatorytypedefault valueInstructions
objImgTrueexpressionobjImgThe image operation object returned by the "Open Image" command
iLeftTruenumber0Specify the starting coordinate point X position of the image before starting cropping
iTopTruenumber0Specify the starting coordinate point Y position of the image before starting cropping
iRightTruenumberone hundredSpecify the end coordinate point X to which the image needs to be cropped
iBottomTruenumberone hundredSpecify the end coordinate point Y to which the image needs to be cropped

Return result

ObjImg, Assign the result of running the command to this variable.

Run instance

/*********************************Image Crop****************************************
Command Prototype:
objImg = Picture.Crop(objImg, iLeft, iTop, iRight, iBottom)
Input Parameters:
objImg -- Picture operation object. Note: The picture operation object returned by the "Open Picture" command.
iLeft -- Starting coordinate point X. Note: The X position of the starting coordinate point of the specified image before starting the crop.
iTop -- Starting coordinate point Y. Note: The Y position of the starting coordinate point of the specified image before starting the crop.
iRight -- Ending coordinate point X. Note: The X position of the ending coordinate point to which the image needs to be cropped.
iBottom -- Ending coordinate point Y. Note: The Y position of the ending coordinate point to which the image needs to be cropped.
Output Parameter:
objImg -- The variable where the output of the function call will be saved.
Notes:
None
********************************************************************************/
Dim objImg = ""
objImg = Picture.Crop(objImg, 0, 0, 100, 100)
TracePrint(objImg)