Constructor
object
ImageMagickProcessor
(string $thumbnailFormat, [string $ImageMagickPath = "/usr/bin"], [string $ImageMagickTempDir = "/tmp"])
-
string
$thumbnailFormat: The mime type of the format you which thumbnails to be generated in. image/jpeg or image/png are recommended.
-
string
$ImageMagickPath: The path to the ImageMagick functions if ImageMagick is availible.
-
string
$ImageMagickTempDir: Directory in which to place images while processing.
Generate a thumbnail from the image format/data passed
string
generateThumbnailData
(string $format, string $data)
-
string
$format: The format of the source image
-
string
$data: The data of the source image
Generate a resized image from the image format/data passed
string
getResizedData
(string $format, integer $size, string $data)
-
string
$format: The format of the source image
-
integer
$size: The max size in pixels of the resulting image
-
string
$data: The data of the source image
Get the format that a resized image will be returned in
string
getResizedFormat
(string $format)
-
string
$format: The format of the source image
Generate a web-safe resized image from the image format/data passed
string
getWebsafeData
(string $format, integer $size, string $data)
-
string
$format: The format of the source image
-
integer
$size: The max size in pixels of the resulting image
-
string
$data: The data of the source image
Get the format that a web-safe resized image will be returned in
string
getWebsafeFormat
(string $format)
-
string
$format: The format of the source image
Return True if we support this format
boolean
isSupported
(string $format)
Generate a new image with possible conversion to a new type and size
string
_generateData
(string $inputExtension, string $ouputExtension, integer $size, string $inputData)
-
string
$inputExtension: The extension that corresponds to the input data.
-
string
$ouputExtension: The extension that corresponds to the output data.
-
integer
$size: The max size in pixels of the output image
-
string
$inputData: The input data.