Methods

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) 

Parameters

$filename

_border()

_border($size, $color) 

Parameters

$size

$color

_crop()

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

Parameters

$x1

$y1

$x2

$y2

_flip()

_flip($mode) 

Parameters

$mode

_grayscale()

_grayscale() 

_mask()

_mask($maskimage) 

Parameters

$maskimage

_resize()

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

Parameters

$width

$height

$keepar

$pad

_rotate()

_rotate($degrees) 

Parameters

$degrees

_rounded()

_rounded($radius, $sides, $antialias) 

Parameters

$radius

$sides

$antialias

_watermark()

_watermark($filename, $position, $padding) 

Parameters

$filename

$position

$padding

add_background()

add_background() 

Creates a new color usable by GD.

create_color(resource $image, string $hex, integer $newalpha) : integer

Parameters

$image

resource

The image to create the color from

$hex

string

The hex code of the color

$newalpha

integer

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

Returns

integerThe color

Creates a new transparent image.

create_transparent_image(integer $width, integer $height, resource $resource) : resource

Parameters

$width

integer

The width of the image.

$height

integer

The height of the image.

$resource

resource

Optionally add an image to the new transparent image.

Returns

resourceReturns the image in resource form.

Merges to images together, using a fix for transparency

image_merge(resource $image, resource $watermark, integer $x, integer $y, integer $alpha) 

Parameters

$image

resource

The bottom image

$watermark

resource

The image to be placed on top

$x

integer

The position of the watermark on the X-axis

$y

integer

The position of the watermark on the Y-axis

$alpha

integer

The transparency of the watermark, 0 (trans) to 100 (opaque)

Creates a rounded corner on the image.

round_corner(resource $image, integer $radius, integer $antialias, boolean $top, boolean $left) 

Parameters

$image

resource

$radius

integer

$antialias

integer

$top

boolean

$left

boolean

 Properties

 

$accepted_extensions

$accepted_extensions 

 

$gdresizefunc

$gdresizefunc 

 

$image_data

$image_data