Imagine
class Imagine extends AbstractImagine
Imagine implementation using the GD library.
Methods
Set the object to be used to read image metadata.
Get the object to be used to read image metadata.
Get the class factory instance to be used.
Checks a path that could be used with ImagineInterface::open and returns a proper string.
Initialize the class.
Creates a new empty image with an optional background color.
Loads an image from a binary $string.
Loads an image from a resource $resource.
Constructs a font with specified $file, $size and $color.
Details
in AbstractImagine at line 36
$this
setMetadataReader(MetadataReaderInterface $metadataReader)
Set the object to be used to read image metadata.
in AbstractImagine at line 48
MetadataReaderInterface
getMetadataReader()
Get the object to be used to read image metadata.
in AbstractImagine at line 62
$this
setClassFactory(ClassFactoryInterface $classFactory)
Set the class factory instance to be used.
in AbstractImagine at line 74
ClassFactoryInterface
getClassFactory()
Get the class factory instance to be used.
in AbstractImagine at line 93
protected string
checkPath(string|object $path)
Checks a path that could be used with ImagineInterface::open and returns a proper string.
at line 35
__construct()
Initialize the class.
at line 45
ImageInterface
create(BoxInterface $size, ColorInterface $color = null)
Creates a new empty image with an optional background color.
at line 85
ImageInterface
open(string|LoaderInterface|mixed $path)
Opens an existing image from $path.
at line 106
ImageInterface
load(string $string)
Loads an image from a binary $string.
at line 116
ImageInterface
read(resource $resource)
Loads an image from a resource $resource.
at line 136
FontInterface
font(string $file, int $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)