Elgg
Version 2.3
|
Image manipulation service. More...
Public Member Functions | |
__construct (ImagineInterface $imagine, Config $config) | |
Constructor. More... | |
resize ($source, $destination=null, array $params=[]) | |
Crop and resize an image. More... | |
normalizeResizeParameters ($width, $height, array $params=[]) | |
Calculate the parameters for resizing an image. More... | |
Public Attributes | |
const | JPEG_QUALITY = 75 |
Protected Member Functions | |
getFileFormat ($filename, $params) | |
Determine the image file format, this is needed for correct resizing. More... | |
Image manipulation service.
Definition at line 17 of file ImageService.php.
Elgg\ImageService::__construct | ( | ImagineInterface | $imagine, |
Config | $config | ||
) |
Constructor.
Definition at line 37 of file ImageService.php.
|
protected |
Determine the image file format, this is needed for correct resizing.
string | $filename | path to the file |
array | $params | array of resizing params (can contain 'format' to set save format) |
Definition at line 212 of file ImageService.php.
Elgg\ImageService::normalizeResizeParameters | ( | $width, | |
$height, | |||
array | $params = [] |
||
) |
Calculate the parameters for resizing an image.
int | $width | Natural width of the image |
int | $height | Natural height of the image |
array | $params | Resize parameters
|
Definition at line 127 of file ImageService.php.
Elgg\ImageService::resize | ( | $source, | |
$destination = null , |
|||
array | $params = [] |
||
) |
Crop and resize an image.
string | $source | Path to source image |
string | $destination | Path to destination If not set, will modify the source image |
array | $params | An array of cropping/resizing parameters
|
Definition at line 66 of file ImageService.php.
const Elgg\ImageService::JPEG_QUALITY = 75 |
Definition at line 19 of file ImageService.php.