ImagineInterface
extends
ClassFactoryAwareInterface
in
The imagine interface.
Table of Contents
Constants
- VERSION = '1.3.5'
Methods
- create() : ImageInterface
- Creates a new empty image with an optional background color.
- font() : FontInterface
- Constructs a font with specified $file, $size and $color.
- getClassFactory() : ClassFactoryInterface
- Get the class factory instance to be used.
- getMetadataReader() : MetadataReaderInterface
- Get the object to be used to read image metadata.
- load() : ImageInterface
- Loads an image from a binary $string.
- open() : ImageInterface
- Opens an existing image from $path.
- read() : ImageInterface
- Loads an image from a resource $resource.
- setClassFactory() : $this
- Set the class factory instance to be used.
- setMetadataReader() : $this
- Set the object to be used to read image metadata.
Constants
VERSION
public
mixed
VERSION
= '1.3.5'
Methods
create()
Creates a new empty image with an optional background color.
public
create(BoxInterface $size[, ColorInterface $color = null ]) : ImageInterface
Parameters
- $size : BoxInterface
- $color : ColorInterface = null
Tags
Return values
ImageInterfacefont()
Constructs a font with specified $file, $size and $color.
public
font(string $file, int $size, ColorInterface $color) : FontInterface
The font size is to be specified in points (e.g. 10pt means 10)
Parameters
- $file : string
- $size : int
- $color : ColorInterface
Return values
FontInterfacegetClassFactory()
Get the class factory instance to be used.
public
getClassFactory() : ClassFactoryInterface
Return values
ClassFactoryInterfacegetMetadataReader()
Get the object to be used to read image metadata.
public
getMetadataReader() : MetadataReaderInterface
Return values
MetadataReaderInterfaceload()
Loads an image from a binary $string.
public
load(string $string) : ImageInterface
Parameters
- $string : string
Tags
Return values
ImageInterfaceopen()
Opens an existing image from $path.
public
open(string|LoaderInterface|mixed $path) : ImageInterface
Parameters
- $path : string|LoaderInterface|mixed
-
the file path, a LoaderInterface instance, or an object whose string representation is the image path
Tags
Return values
ImageInterfaceread()
Loads an image from a resource $resource.
public
read(resource $resource) : ImageInterface
Parameters
- $resource : resource
Tags
Return values
ImageInterfacesetClassFactory()
Set the class factory instance to be used.
public
setClassFactory(ClassFactoryInterface $classFactory) : $this
Parameters
- $classFactory : ClassFactoryInterface
Return values
$thissetMetadataReader()
Set the object to be used to read image metadata.
public
setMetadataReader(MetadataReaderInterface $metadataReader) : $this
Parameters
- $metadataReader : MetadataReaderInterface