QPx_CropPicture
QPx_CropPicture(pictVar; pictVar; pictVar; pictVar; pictVar):error | |||
---|---|---|---|
![]() |
pictVar | Picture | Picture variable |
![]() |
cropLeft | Longint | Crop rectangle left |
![]() |
cropTop | Longint | Crop rectangle top |
![]() |
cropRight | Longint | Crop rectangle right |
![]() |
cropBottom | Longint | Crop rectangle bottom |
![]() |
error | Longint | Error result |
Crop a picture to a rectangle
The source picture is passed in the pictVar parameter. The source picture may be compressed or uncompressed. The cropped picture is also returned in the pictVar parameter and it is always uncompressed. If an error occurs, pictVar is set to an empty picture.
Parameters cropLeft, cropTop, cropRight and cropBottom specify the cropping rectangle. If the rectangle described by these coordinates exceeds the image bounds, the respective coordinates will be automatically constrained to the image rectangle (no error will be returned).