ResizeImageFile
CFile::ResizeImageFile( $sourceFile, &$destinationFile, $arSize, $resizeType = BX_RESIZE_IMAGE_PROPORTIONAL, $arWaterMark = array(), $jpgQuality=false, $arFilters=false )
The method modifies image file size. If the original file has .BMP extension, the destination file will be converted to .JPEG format and the modified name will be returned into intodestinationFile. Static method.
Parameters
Parameter | Description | Available fr om version |
---|---|---|
sourceFile | Path original source file | |
destinationFile | Path to destination file, resulting fr om the processing. If the source file has .BMP format, the file will be converted to .JPEG format and the modified name will be returned into intodestinationFile. | |
Size | Array of type array("width" => $width, "height" => $height)); both keys are required. | |
resizeType | type of resizing:
| |
arWaterMark | array with watermark parameters, the keys are the following:
| |
jpgQuality | Degree of JPG-compression. Optional parameter. By default - false, which equals to 95% image quality. If the full quality is required, pass the "100" in the parameter. | |
Filters | Array of filter parameters. Optional parameter. By default - false. |
Examples of use
© «Bitrix24», 2001-2024