rcube_image

Image resizer and converter

package

Framework

subpackage

Utils

Methods

__construct

__construct($filename) 

Arguments

$filename

Get image properties.

props() : mixed

Response

mixed

Hash array with image props like type, width, height

Resize image to a given size. Use only to shrink an image.

resize(int $size, string $filename = null, boolean $browser_compat = false) : mixed

If an image is smaller than specified size it will be not resized.

Arguments

$size

int

Max width/height size

$filename

string

Output filename

$browser_compat

boolean

Convert to image type displayable by any browser

Response

mixed

Output type on success, False on failure

Convert image to a given type

convert(int $type, string $filename = null) : bool

Arguments

$type

int

Destination file type (see class constants)

$filename

string

Output filename (if empty, original file will be used

                     and filename extension will be modified)

Response

bool

True on success, False on failure

Identify command handler.

identify() 

Constants

TYPE_GIF

TYPE_GIF

TYPE_JPG

TYPE_JPG

TYPE_PNG

TYPE_PNG

TYPE_TIF

TYPE_TIF

Properties

image_file

image_file : 

extensions

extensions : 
static