Function cApiImgScaleLQ
Scales (or crops) an image. If scaling, the aspect ratio is maintained.
Returns the path to the scaled temporary image.
Note that this function does some very poor caching; it calculates an md5 hash out of the image plus the maximum X and Y sizes, and uses that as the file name. If the file is older than 10 minutes it will be regenerated.
Package: Core\Backend
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Timo Hummel
Located at includes/functions.api.images.php
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Timo Hummel
Located at includes/functions.api.images.php
string |
$img |
The path to the image (relative to the frontend) |
integer |
$maxX |
The maximum size in x-direction |
integer |
$maxY |
The maximum size in y-direction |
boolean |
$crop = false |
[optional] If true, the image is cropped and not scaled. |
boolean |
$expand = false |
[optional] If true, the image is expanded (e.g. really scaled). If false, the image will only be made smaller. |
integer |
$cacheTime = 10 |
[optional] The number of minutes to cache the image, use 0 for unlimited |
integer |
$quality = 0 |
[optional] The quality of the output file |
boolean |
$keepType = false |
[optional] If true and a png file is source, output file is also png |
string
|
url to the resulting image (http://... |