Marblecore Imaging Library Documentation

Documentation Introduction
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

ParameterTypeRequiredDescription
strFileStringYesString containing the path of the JPEG file.
nLeftNumberYesSpecifies the left position of the cropped rectangle.
nTopNumberYesSpecifies the top position of the cropped rectangle.
nWidthNumberNoOptional parameter containing the width of the cropped rectangle.
nHeightNumberNoOptional parameter containing the height of the cropped rectangle.
strSaveAsStringNoOptional string containing the path of the output JPEG file.

Category

Lossless transformations

See also

LosslessFlipHorizontal | LosslessFlipVertical | LosslessRotate | LosslessRotateLeft | LosslessRotateRight