Class

Imagine\Gd\Imagine

class Imagine extends AbstractImagine

Imagine implementation using the GD library

Methods

ImagineInterface setMetadataReader(MetadataReaderInterface $metadataReader)

from AbstractImagine
MetadataReaderInterface getMetadataReader()

from AbstractImagine
__construct()

ImageInterface create(BoxInterface $size, ColorInterface $color = null)

Creates a new empty image with an optional background color

ImageInterface open(string $path)

Opens an existing image from $path

ImageInterface load(string $string)

Loads an image from a binary $string

ImageInterface read(resource $resource)

Loads an image from a resource $resource

FontInterface font(string $file, integer $size, ColorInterface $color)

Constructs a font with specified $file, $size and $color

Details

in AbstractImagine at line 27
public ImagineInterface setMetadataReader(MetadataReaderInterface $metadataReader)

Parameters

MetadataReaderInterface $metadataReader

Return Value

ImagineInterface

in AbstractImagine at line 37
public MetadataReaderInterface getMetadataReader()

at line 37
public __construct()

Exceptions

RuntimeException

at line 46
public ImageInterface create(BoxInterface $size, ColorInterface $color = null)

Creates a new empty image with an optional background color

Parameters

BoxInterface $size
ColorInterface $color

Return Value

ImageInterface

Exceptions

InvalidArgumentException
RuntimeException

at line 84
public ImageInterface open(string $path)

Opens an existing image from $path

Parameters

string $path

Return Value

ImageInterface

Exceptions

RuntimeException

at line 105
public ImageInterface load(string $string)

Loads an image from a binary $string

Parameters

string $string

Return Value

ImageInterface

Exceptions

RuntimeException

at line 113
public ImageInterface read(resource $resource)

Loads an image from a resource $resource

Parameters

resource $resource

Return Value

ImageInterface

Exceptions

RuntimeException

at line 131
public FontInterface font(string $file, integer $size, ColorInterface $color)

Constructs a font with specified $file, $size and $color

The font size is to be specified in points (e.g. 10pt means 10)

Parameters

string $file
integer $size
ColorInterface $color

Return Value

FontInterface