ImageUtils
in package
Miscellaneous image operations.
Table of Contents
Methods
- compressImageQuality() : void
- Compresses the quality of the provided MiniMagick image.
- resizeImage() : void
- Resizes a provided MiniMagick Image with the given width & height, if present.
- toCURLFile() : CURLFile
- Converts an Imagick into a valid CURLFile handle.
- toMagickImage() : Imagick
Methods
compressImageQuality()
Compresses the quality of the provided MiniMagick image.
public
static compressImageQuality(Imagick $image[, int $quality = 85 ]) : void
Parameters
- $image : Imagick
-
Imagick image handle.
- $quality : int = 85
-
Quality to apply to the image. This operation is independent of a JPG's base quality.
Tags
resizeImage()
Resizes a provided MiniMagick Image with the given width & height, if present.
public
static resizeImage(Imagick $image[, int|null $width = null ][, int|null $height = null ]) : void
Parameters
- $image : Imagick
-
Imagick image handle.
- $width : int|null = null
-
Width to comply with.
- $height : int|null = null
-
Height to comply with.
Tags
toCURLFile()
Converts an Imagick into a valid CURLFile handle.
public
static toCURLFile(Imagick $image) : CURLFile
Parameters
- $image : Imagick
-
Imagick image handle.
Tags
Return values
CURLFiletoMagickImage()
public
static toMagickImage(mixed $image) : Imagick
Parameters
- $image : mixed
-
Image handle.
Tags
Return values
Imagick —A valid Imagick handle, CURLFile, SplFileObject or resource. The resulting image is formatted to jpeg.