ImagickDriver
class ImagickDriver extends InterventionDriver (View source)
Properties
| protected Transformation>, callable> | $transformationHandlers | The registered transformation handlers. |
from InterventionDriver |
| protected ImageManager | $manager | The Intervention image manager instance. |
from InterventionDriver |
Methods
Create the underlying Intervention image manager.
Process the given image contents with the specified pipeline.
Get the dimensions of the given image contents.
Resolve a background color, expanding the "dominant" sentinel when needed.
Get the dominant (average) color of the image as a hex string.
Sample the dominant color by resizing the image to a single pixel.
Register a transformation handler.
Get the handler for the given transformation.
Details
__construct()
Create a new Intervention driver instance.
protected ImageManager
createManager()
Create the underlying Intervention image manager.
void
ensureRequirementsAreMet()
Ensure Intervention Image is installed.
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.
protected string|null
resolveBackground(ImageInterface $image, string|null $background)
Resolve a background color, expanding the "dominant" sentinel when needed.
string
dominantColor(string $contents)
Get the dominant (average) color of the image as a hex string.
protected string
dominantColorFrom(ImageInterface $image)
Sample the dominant color by resizing the image to a single pixel.
Driver
transformUsing(string $transformation, callable $callback)
Register a transformation handler.
protected callable|null
transformationHandlerFor(object $transformation)
Get the handler for the given transformation.