ImageCompressor
in package
Image compressor class to handle image compression.
Table of Contents
Methods
- compress() : CURLFile
Methods
compress()
public
static compress(mixed $inputImage[, int|null $quality = 85 ][, int|null $maxWidth = null ][, int|null $maxHeight = null ]) : CURLFile
Parameters
- $inputImage : mixed
-
Input image. Accepts SplFileObject, CURLFile, Imagick & resources.
- $quality : int|null = 85
-
Quality to apply to the image.
- $maxWidth : int|null = null
-
Maximum width to constrain the image to. Defaults to the image's size if unset.
- $maxHeight : int|null = null
-
Maximum Height to constrain the image to. Defaults to the image's size if unset.
Tags
Return values
CURLFile —Curlfile handle for the image.