Procedural File: _image.funcs.php
Source Location: /qp_inc/files/model/_image.funcs.php
Functions
crop_to_constraint [line 57]
void crop_to_constraint(
integer $src_width, integer $src_height, integer $max_width, integer $max_height
)
|
|
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 |
fit_into_constraint [line 112]
void fit_into_constraint(
integer $src_width, integer $src_height, integer $max_width, integer $max_height
)
|
|
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 |
generate_thumb [line 251]
array generate_thumb(
$src_imh, $thumb_type, $thumb_width, $thumb_height
)
|
|
Generate a thumbnail
Parameters:
|
|
$src_imh: |
|
|
|
$thumb_type: |
|
|
|
$thumb_width: |
|
|
|
$thumb_height: |
|
API Tags:
| Return: | short error code + dest image handler |
get_available_thumb_sizes [line 34]
array get_available_thumb_sizes(
)
|
|
API Tags:
array load_image(
string $path, string $mimetype
)
|
|
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 |
string output_image(
resource $imh, string $mimetype
)
|
|
Output an image from memory to web client
Parameters:
|
resource |
$imh: |
image handle |
|
string |
$mimetype: |
|
string save_image(
resource $imh, string $path, string $mimetype, [integer $quality = 90], [string $chmod = NULL]
)
|
|
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 |
scale_to_constraint [line 85]
void scale_to_constraint(
integer $src_width, integer $src_height, integer $max_width, integer $max_height
)
|
|
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 |
|
integer |
$max_height: |
constrained height |
|
|