function.image.php
21 * Purpose: Renders an image tag, if the 'src' value points to an image file or the 'default' parameter is
22 * given. If 'width' or 'height' are given, the image will be resized to that values. The resize method
23 * depends on the 'sizemode' parameter. If the image size will be physically changed, a copy will be created
25 * cache invalidates the image cache too. The content of the 'params' parameter will be put as is in the
34 * - fitInto: The image is resized if it's width or height exceeds one of the given values. Image proportions will be kept.
35 * - scaleTo: The image is resized if it's width or height differs from the given values. Image proportions will be kept.
36 * - default: The image is resized if it's width or height differs from the given values. Image proportions will be ignored.
37 * The image will be resized according to the given sizemode. The image won't be cropped with 'valuemode' set to anything else than default.
38 * If the parameter is not given, default is used. Size attributes may be skipped using the nosizeoutput parameter.
39 * Usage: {image src=$image->getFile() base="cms/application/" width="100" alt="Image 1" params='border="0"'
88 // if image should fit into a rectangle and it's height is smaller than the requested, leave image untouched
92 // if image should fit into a rectangle and it's width is smaller than the requested, leave image untouched
132 $destNameAbs = $template->cache_dir.md5($file.filectime($file).$requestedWidth.$requestedHeight.$sizemode).'.'.$extension;
133 $destName = URIUtil::makeRelative($destNameAbs, dirname(FileUtil::realpath($_SERVER['SCRIPT_FILENAME'])).'/');
GraphicsUtil provides support for graphic manipulation.
Definition: GraphicsUtil.php:34