Methods

isInstalled()

isInstalled() : boolean

Check if the required image library extension is installed.

Returns

boolean

getFormats()

getFormats() : array

Get the allowed image formats

Returns

array

getAllowedTypes()

getAllowedTypes() : resource

Get the image resource

Returns

resource

info()

info() : \ArrayObject

Get the image extension info

Returns

\ArrayObject

version()

version() : string

Get the image extension version

Returns

string

getQuality()

getQuality() : integer

Get the image quality.

Returns

integer

setQuality()

setQuality(integer  $quality) : \Pop\Image\ImageInterface

Set the image quality.

Parameters

integer $quality

Returns

\Pop\Image\ImageInterface

resizeToWidth()

resizeToWidth(integer  $w) : \Pop\Image\ImageInterface

Resize the image object to the width parameter passed.

Parameters

integer $w

Returns

\Pop\Image\ImageInterface

resizeToHeight()

resizeToHeight(integer  $h) : \Pop\Image\ImageInterface

Resize the image object to the height parameter passed.

Parameters

integer $h

Returns

\Pop\Image\ImageInterface

resize()

resize(integer  $px) : \Pop\Image\ImageInterface

Resize the image object, allowing for the largest dimension to be scaled to the value of the $px argument.

Parameters

integer $px

Returns

\Pop\Image\ImageInterface

scale()

scale(float  $scale) : \Pop\Image\ImageInterface

Scale the image object, allowing for the dimensions to be scaled proportionally to the value of the $scl argument.

Parameters

float $scale

Returns

\Pop\Image\ImageInterface

crop()

crop(integer  $w, integer  $h, integer  $x, integer  $y) : \Pop\Image\ImageInterface

Crop the image object to a image whose dimensions are based on the value of the $wid and $hgt argument. The optional $x and $y arguments allow for the adjustment of the crop to select a certain area of the image to be cropped.

Parameters

integer $w
integer $h
integer $x
integer $y

Returns

\Pop\Image\ImageInterface

cropThumb()

cropThumb(integer  $px, integer  $offset = null) : \Pop\Image\ImageInterface

Crop the image object to a square image whose dimensions are based on the value of the $px argument. The optional $offset argument allows for the adjustment of the crop to select a certain area of the image to be cropped.

Parameters

integer $px
integer $offset

Returns

\Pop\Image\ImageInterface

rotate()

rotate(integer  $degrees, array  $bgColor = array(255, 255, 255)) : \Pop\Image\ImageInterface

Rotate the image object

Parameters

integer $degrees
array $bgColor

Throws

\Pop\Image\Exception

Returns

\Pop\Image\ImageInterface

convert()

convert(string  $type) : \Pop\Image\ImageInterface

Convert the image object to another format.

Parameters

string $type

Throws

\Pop\Image\Exception

Returns

\Pop\Image\ImageInterface

getColor()

getColor(array  $color) : mixed

Create and return a color.

Parameters

array $color

Throws

\Pop\Image\Exception

Returns

mixed