Documentation / Marblecore Imaging / Methods / LosslessCrop
LosslessCrop method
Performs a lossless crop on the specified JPEG file. To perform this lossless operation the width and height of the cropped rectangle must be adjusted so that the image dimensions are a multiple of the iMCU size (usually 8 or 16 pixels). Therefore the output width or height can be slightly greater than the requested image size.
Syntax
Boolean LosslessCrop(strFile As String, nLeft As Number, nTop As Number, nWidth As Number, nHeight As Number, strSaveAs As String)
Return value
Returns true if the function succeeded.
Parameters
Parameter | Type | Required | Description |
strFile | String | Yes | String containing the path of the JPEG file. |
nLeft | Number | Yes | Specifies the left position of the cropped rectangle. |
nTop | Number | Yes | Specifies the top position of the cropped rectangle. |
nWidth | Number | No | Optional parameter containing the width of the cropped rectangle. |
nHeight | Number | No | Optional parameter containing the height of the cropped rectangle. |
strSaveAs | String | No | Optional string containing the path of the output JPEG file. |
Category
Lossless transformations
See also
LosslessFlipHorizontal |
LosslessFlipVertical |
LosslessRotate |
LosslessRotateLeft |
LosslessRotateRight