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, regenerate it.
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 |
If true, the image is cropped and not scaled. |
boolean |
$expand = false |
<p>If true, the image is expanded (e.g. really scaled). If false, the image will only be made smaller.</p> |
integer |
$cacheTime = 10 |
<p>The number of minutes to cache the image, use 0 for unlimited</p> |
integer |
$quality = 0 |
The quality of the output file |
boolean |
$keepType = false |
<p>If true and a png file is source, output file is also png</p> |
string
|
url to the resulting image (http://... |