\GrafikaImageInterface

Interface ImageInterface

Summary

Methods
Constants
blob()
createBlank()
createFromCore()
createFromFile()
getCore()
getHeight()
getImageFile()
getType()
getWidth()
isAnimated()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

blob()

blob(string|\Grafika\ImageType  $type) 

Output a binary raw dump of an image in a specified format.

Parameters

string|\Grafika\ImageType $type

Image format of the dump. See Grafika\ImageType for supported formats.

createBlank()

createBlank(integer  $width = 1, integer  $height = 1) : \Grafika\ImageInterface

Create a blank image.

Parameters

integer $width

Width of image in pixels.

integer $height

Height of image in pixels.

Returns

\Grafika\ImageInterface

Instance of image.

createFromCore()

createFromCore(resource|\Imagick  $core) : \Grafika\ImageInterface

Create Image from core.

Parameters

resource|\Imagick $core

GD resource for GD editor or Imagick instance for Imagick editor

Returns

\Grafika\ImageInterface

Instance of image.

createFromFile()

createFromFile(string  $imageFile) : \Grafika\ImageInterface

Create Image from image file.

Parameters

string $imageFile

Path to image file.

Returns

\Grafika\ImageInterface

Instance of image.

getCore()

getCore() : resource|\Imagick

Get Image core.

Returns

resource|\Imagick —

GD resource or Imagick instance

getHeight()

getHeight() : integer

Returns

integer —

Height in pixels.

getImageFile()

getImageFile() : string

Returns

string —

File path to image if Image was created from an image file.

getType()

getType() : string

Returns

string —

Type of image. See ImageType.

getWidth()

getWidth() : integer

Returns

integer —

Width in pixels.

isAnimated()

isAnimated() : boolean

Returns animated flag.

Returns

boolean —

True if animated GIF or false otherwise.