\Pop\ImageImageInterface

Image interface

Summary

Methods
Constants
create()
load()
resource()
getFullpath()
getDir()
getBasename()
getFilename()
getExtension()
getSize()
getMime()
getWidth()
getHeight()
save()
output()
destroy()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

create()

create(integer  $width, integer  $height, string  $image = null) : \Pop\Image\ImageInterface

Create a new image resource

Parameters

integer $width
integer $height
string $image

Returns

\Pop\Image\ImageInterface

load()

load(string  $image) : \Pop\Image\ImageInterface

Load an existing image as a resource

Parameters

string $image

Throws

\Pop\Image\Exception

Returns

\Pop\Image\ImageInterface

resource()

resource() : resource

Get the image resource

Returns

resource

getFullpath()

getFullpath() : string

Get the image full path

Returns

string

getDir()

getDir() : string

Get the image directory

Returns

string

getBasename()

getBasename() : string

Get the image basename

Returns

string

getFilename()

getFilename() : string

Get the image filename

Returns

string

getExtension()

getExtension() : string

Get the image extension

Returns

string

getSize()

getSize() : integer

Get the image size

Returns

integer

getMime()

getMime() : string

Get the image mime type

Returns

string

getWidth()

getWidth() : integer

Get the image width.

Returns

integer

getHeight()

getHeight() : integer

Get the image height.

Returns

integer

save()

save(string  $to = null) : void

Save the image object to disk.

Parameters

string $to

output()

output(boolean  $download = false) : void

Output the image object directly.

Parameters

boolean $download

destroy()

destroy(boolean  $delete = false) : void

Destroy the image object and the related image file directly.

Parameters

boolean $delete