Methods

__destruct()

__destruct() 

load()

load($filename, $return_data, $force_extension) 

Parameters

$filename

$return_data

$force_extension

output()

output($filetype) 

Parameters

$filetype

save()

save($filename, $permissions) 

Parameters

$filename

$permissions

sizes()

sizes($filename, $usecache) 

Parameters

$filename

$usecache

_border()

_border($size, $color) 

Parameters

$size

$color

_crop()

_crop($x1, $y1, $x2, $y2) 

Parameters

$x1

$y1

$x2

$y2

_flip()

_flip($direction) 

Parameters

$direction

_grayscale()

_grayscale() 

_mask()

_mask($maskimage) 

Parameters

$maskimage

_resize()

_resize($width, $height, $keepar, $pad) 

Parameters

$width

$height

$keepar

$pad

_rotate()

_rotate($degrees) 

Parameters

$degrees

Credit to Leif Åstrand <leif@sitelogic.fi> for the base of the round corners.

_rounded($radius, $sides, $antialias) 

Note there is a defect with this, as non-transparent corners get opaque circles of color. Maybe mask it with auto-generated corners?

link http://www.imagemagick.org/Usage/thumbnails/#rounded

Parameters

$radius

$sides

$antialias

_watermark()

_watermark($filename, $position, $padding) 

Parameters

$filename

$position

$padding

add_background()

add_background() 

Cleared the currently loaded sizes, used to removed cached sizes.

clear_sizes() 

Creates a new color usable by ImageMagick.

create_color(string $hex, integer $alpha) : string

Parameters

$hex

string

The hex code of the color

$alpha

integer

The alpha of the color, 0 (trans) to 100 (opaque)

Returns

stringrgba representation of the hex and alpha values.

Executes the specified imagemagick executable and returns the output.

exec(string $program, string $params, boolean $passthru) : mixed

Parameters

$program

string

The name of the executable.

$params

string

The parameters of the executable.

$passthru

boolean

Returns the output if false or pass it to browser.

Returns

mixedEither returns the output or returns nothing.

 Properties

 

$accepted_extensions

$accepted_extensions 

 

$im_path

$im_path 

 

$image_temp

$image_temp 

 

$sizes_cache

$sizes_cache