Image_Driver
Package | Image |
---|---|
Inheritance | abstract class Image_Driver |
Subclasses | Image_GD_Driver, Image_ImageMagick_Driver |
Image API driver.
$Id: Image.php 3769 2008-12-15 00:48:56Z zombor $
$Id: Image.php 3769 2008-12-15 00:48:56Z zombor $
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
errors | Image_Driver | ||
image | Image_Driver | ||
tmp_image | Image_Driver |
Public Methods
Method | Description | Defined By |
---|---|---|
crop() | Crop an image. Valid properties are: width, height, top, left. | Image_Driver |
execute() | Executes a set of actions, defined in pairs. | Image_Driver |
flip() | Flip an image. Valid directions are horizontal and vertical. | Image_Driver |
process() | Process an image with a set of actions. | Image_Driver |
resize() | Resize an image. Valid properties are: width, height, and master. | Image_Driver |
rotate() | Rotate an image. Valid amounts are -180 to 180. | Image_Driver |
sharpen() | Sharpen and image. Valid amounts are 1 to 100. | Image_Driver |
Protected Methods
Method | Description | Defined By |
---|---|---|
properties() | Return the current width and height of the temporary image. This is mainly | Image_Driver |
sanitize_geometry() | Sanitize and normalize a geometry array based on the temporary image | Image_Driver |
Property Details
errors
property
protected $errors;
image
property
protected $image;
tmp_image
property
protected $tmp_image;
Method Details
crop()
method
abstract public boolean crop(array $properties)
| ||
$properties | array | new properties |
{return} | boolean |
Crop an image. Valid properties are: width, height, top, left.
execute()
method
public boolean execute(array $actions)
| ||
$actions | array | actions |
{return} | boolean |
Executes a set of actions, defined in pairs.
flip()
method
abstract public boolean flip(integer $direction)
| ||
$direction | integer | direction to flip |
{return} | boolean |
Flip an image. Valid directions are horizontal and vertical.
process()
method
abstract public boolean process(string $image, array $actions, string $dir, string $file)
| ||
$image | string | image filename |
$actions | array | actions to execute |
$dir | string | destination directory path |
$file | string | destination filename |
{return} | boolean |
Process an image with a set of actions.
properties()
method
abstract protected array properties()
| ||
{return} | array | width, height |
Return the current width and height of the temporary image. This is mainly needed for sanitizing the geometry.
resize()
method
abstract public boolean resize(array $properties)
| ||
$properties | array | new properties |
{return} | boolean |
Resize an image. Valid properties are: width, height, and master.
rotate()
method
abstract public boolean rotate(integer $amount)
| ||
$amount | integer | amount to rotate |
{return} | boolean |
Rotate an image. Valid amounts are -180 to 180.
sanitize_geometry()
method
protected void sanitize_geometry(array $geometry)
| ||
$geometry | array | geometry properties |
{return} | void |
Sanitize and normalize a geometry array based on the temporary image width and height. Valid properties are: width, height, top, left.
sharpen()
method
abstract public boolean sharpen(integer $amount)
| ||
$amount | integer | amount to sharpen |
{return} | boolean |
Sharpen and image. Valid amounts are 1 to 100.