Image Cropping
Command Description
Crop the specified area of the image file
Command Prototype
objImg = Picture.Crop(objImg, iLeft, iTop, iRight, iBottom)
Command parameter
parameter | mandatory | type | default value | Instructions |
---|---|---|---|---|
objImg | True | expression | objImg | The image operation object returned by the "Open Image" command |
iLeft | True | number | 0 | Specify the starting coordinate point X position of the image before starting cropping |
iTop | True | number | 0 | Specify the starting coordinate point Y position of the image before starting cropping |
iRight | True | number | one hundred | Specify the end coordinate point X to which the image needs to be cropped |
iBottom | True | number | one hundred | Specify 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)