Imagick_Driver
Converts images, including animations, with the preferred Imagick extension.
Namespace: WebberZone\Image_Optimizer\Drivers
Since: 1.0.0
Source: includes/drivers/class-imagick-driver.php line 21
Extends: Driver
Methods
is_available() static
Whether the Imagick extension is loaded.
Since: 1.0.0
Line: 38
static public function is_available( ): bool;
Returns: bool — True when available.
get_name() static
Machine name of the driver.
Since: 1.0.0
Line: 49
static public function get_name( ): string;
Returns: string — Driver slug.
supports()
Whether Imagick reports the format; capability probes verify actual encoding.
Since: 1.0.0
Line: 61
public function supports( string $format ): bool;
| Type | Name | Description |
|---|---|---|
string |
$format |
Target format slug. |
Returns: bool — True when the delegate is registered.
convert()
Encode a source image into the target format.
Since: 1.0.0
Line: 94
public function convert( string $source, string $destination, string $format, array $args ): true|\WP_Error;
| Type | Name | Description |
|---|---|---|
string |
$source |
Absolute path to the source image. |
string |
$destination |
Absolute path to write. |
string |
$format |
Target format slug. |
array |
$args |
Returns: true|\WP_Error — True on success, WP_Error on failure.