PHP Interface Grafika\ImageInterface

Show file Open project: kosinix/grafika Interface Usage Examples

Public Methods

Method Description
blob ( string | ImageType $type ) Output a binary raw dump of an image in a specified format.
createBlank ( integer $width = 1, integer $height = 1 ) : grafika\ImageInterface Create a blank image.
createFromCore ( resource | Imagick $core ) : grafika\ImageInterface Create Image from core.
createFromFile ( string $imageFile ) : grafika\ImageInterface Create Image from image file.
getCore ( ) : resource | Imagick Get Image core.
getHeight ( ) : integer
getImageFile ( ) : string
getType ( ) : string
getWidth ( ) : integer
isAnimated ( ) : boolean Returns animated flag.

Method Details

blob() public method

Output a binary raw dump of an image in a specified format.
public blob ( string | ImageType $type )
$type string | ImageType Image format of the dump. See Grafika\ImageType for supported formats.

createBlank() public static method

Create a blank image.
public static createBlank ( integer $width = 1, integer $height = 1 ) : grafika\ImageInterface
$width integer Width of image in pixels.
$height integer Height of image in pixels.
return grafika\ImageInterface Instance of image.

createFromCore() public static method

Create Image from core.
public static createFromCore ( resource | Imagick $core ) : grafika\ImageInterface
$core resource | Imagick GD resource for GD editor or Imagick instance for Imagick editor
return grafika\ImageInterface Instance of image.

createFromFile() public static method

Create Image from image file.
public static createFromFile ( string $imageFile ) : grafika\ImageInterface
$imageFile string Path to image file.
return grafika\ImageInterface Instance of image.

getCore() public method

Get Image core.
public getCore ( ) : resource | Imagick
return resource | Imagick GD resource or Imagick instance

getHeight() public method

public getHeight ( ) : integer
return integer Height in pixels.

getImageFile() public method

public getImageFile ( ) : string
return string File path to image if Image was created from an image file.

getType() public method

public getType ( ) : string
return string Type of image. See ImageType.

getWidth() public method

public getWidth ( ) : integer
return integer Width in pixels.

isAnimated() public method

Returns animated flag.
public isAnimated ( ) : boolean
return boolean True if animated GIF or false otherwise.