Procedural File: _image.funcs.php
Source Location: /blogs/inc/files/model/_image.funcs.php
Page Details
This file implements various Image File handling functions.
This file is part of the evoCore framework - http://evocore.net/ See also http://sourceforge.net/projects/evocms/.
| Author: | fplanque: Francois PLANQUE. |
| Version: | $Id: _image.funcs.php,v 1.22 2010/02/21 04:47:07 sam2kb Exp $ |
| Copyright: | (c)2003-2010 by Francois PLANQUE - http://fplanque.net/ |
| Filesource: | Source Code for this file |
Functions
crop_to_constraint [line 59]
|
Crop dimensions to fit into a constrained size, while preserving aspect ratio.
Parameters:| integer | $src_width: | source width |
| integer | $src_height: | source height |
| integer | $max_width: | constrained width |
| integer | $max_height: | constrained height |
API Tags:
| Return: | ( x, y, width, height ) |
[ Top ]
fit_into_constraint [line 121]
|
Scale dimensions to fit into a constrained size, while preserving aspect ratio.
The scaling only happens if the source is larger than the constraint.
Parameters:| integer | $src_width: | source width |
| integer | $src_height: | source height |
| integer | $max_width: | constrained width |
| integer | $max_height: | constrained height |
[ Top ]
generate_thumb [line 308]
|
Generate a thumbnail
Parameters:| resource | $src_imh: | Image resource |
| string | $thumb_type: | Thumbnail type ('crop'|'fit') |
| int | $thumb_width: | Thumbnail width |
| int | $thumb_height: | Thumbnail height |
API Tags:
| Return: | short error code + dest image handler |
[ Top ]
get_available_thumb_sizes [line 35]
load_image [line 139]
|
Load an image from a file into memory
Parameters:| string | $path: | pathname of image file |
| string | $mimetype: |
API Tags:
| Return: | resource image handle or NULL |
[ Top ]
output_image [line 271]
|
Output an image from memory to web client
Parameters:| resource | $imh: | image handle |
| string | $mimetype: |
[ Top ]
save_image [line 209]
|
Output an image from memory to web client
Parameters:| resource | $imh: | image handle |
| string | $path: | pathname of image file |
| string | $mimetype: | |
| integer | $quality: | |
| string | $chmod: | permissions |
[ Top ]
scale_to_constraint [line 89]
|
Scale dimensions to fit into a constrained size, while preserving aspect ratio.
Parameters:| integer | $src_width: | source width |
| integer | $src_height: | source height |
| integer | $max_width: | constrained width (might be NULL/0 to use source width) |
| integer | $max_height: | constrained height (might be NULL/0 to use source height) |
API Tags:
| Return: | (width, height) |
[ Top ]
