HumHub Documentation (unofficial)

Imagine extends AbstractImagine
in package
implements InfoProvider

Imagine implementation using the Imagick PHP extension.

Tags
final

Table of Contents

Interfaces

InfoProvider
Interface implemented by classes that provide info about a graphics driver.

Properties

$classFactory  : ClassFactoryInterface
$metadataReader  : MetadataReaderInterface|null

Methods

__construct()  : mixed
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.
getDriverInfo()  : Info|null
Get the info about this driver.
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.
checkPath()  : string
Checks a path that could be used with ImagineInterface::open and returns a proper string.
createPalette()  : CMYK|Grayscale|RGB
Returns the palette corresponding to an \Imagick resource colorspace.

Properties

Methods

getDriverInfo()

Get the info about this driver.

public static getDriverInfo([mixed $required = true ]) : Info|null
Parameters
$required : mixed = true

when the driver is not available: if FALSE the function returns NULL, if TRUE the driver throws a \Imagine\Exception\NotSupportedException

Tags
see
InfoProvider::getDriverInfo()
since
1.3.0
Return values
Info|null

checkPath()

Checks a path that could be used with ImagineInterface::open and returns a proper string.

protected checkPath(string|object $path) : string
Parameters
$path : string|object
Tags
throws
InvalidArgumentException

in case the given path is invalid

Return values
string

        
On this page

Search results