interface Driver

Methods

string
process(string $contents, ImagePipeline $pipeline)

Process the given image contents with the specified pipeline.

array
dimensions(string $contents)

Get the dimensions of the given image contents.

string
dominantColor(string $contents)

Get the dominant (average) color of the image as a hex string.

transformUsing(string $transformation, callable $callback)

Register a transformation handler.

Details

at line 16
string process(string $contents, ImagePipeline $pipeline)

Process the given image contents with the specified pipeline.

Implementations must treat the pipeline as read-only and must not retain it after this call.

Parameters

string $contents
ImagePipeline $pipeline

Return Value

string

at line 23
array dimensions(string $contents)

Get the dimensions of the given image contents.

Parameters

string $contents

Return Value

array

at line 28
string dominantColor(string $contents)

Get the dominant (average) color of the image as a hex string.

Parameters

string $contents

Return Value

string

at line 37
Driver transformUsing(string $transformation, callable $callback)

Register a transformation handler.

Boot-only. The handler persists on a cached driver for the worker lifetime and affects every subsequent image processed by that driver.

Parameters

string $transformation
callable $callback

Return Value

Driver