Save
extends AbstractImagickCommand
in package
uses
ImagickTrait
Save command class.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- execute() : bool
- Execute the command.
- fillWhiteToImage() : mixed
- Fill white to the image.
- getFirstFrame() : mixed
- Get animated picture's first frame.
- setErrorMessage() : mixed
- Set error message and code. This will be set statusXxx properties.
- setStatusSuccess() : mixed
- Set status as success and remove error message, error code.
- getImageColorAlpha() : mixed
- Get image color with alpha value (transparency).
Properties
$ImagickD
protected
Imagick
$ImagickD
The Imagick driver class.
Methods
__construct()
public
__construct(Imagick $Imagick) : mixed
Parameters
- $Imagick : Imagick
execute()
Execute the command.
public
execute(mixed $file_name) : bool
Parameters
- $file_name : mixed
Return values
boolfillWhiteToImage()
Fill white to the image.
protected
fillWhiteToImage() : mixed
getFirstFrame()
Get animated picture's first frame.
protected
getFirstFrame() : mixed
setErrorMessage()
Set error message and code. This will be set statusXxx properties.
protected
setErrorMessage(string $errorMessage, int $errorCode) : mixed
Parameters
- $errorMessage : string
-
The error message.
- $errorCode : int
-
The error code, usually it is class's constant.
Tags
setStatusSuccess()
Set status as success and remove error message, error code.
protected
setStatusSuccess() : mixed
Tags
getImageColorAlpha()
Get image color with alpha value (transparency).
private
getImageColorAlpha(string $colorName, int $alpha) : mixed
Parameters
- $colorName : string
-
The color name. Supported 'black', 'white', 'red', 'green', 'blue', 'yellow', 'cyan', 'magenta'.
- $alpha : int
-
The alpha value for use with
\ImagickPixel('rgba()'). The value should be 0.0 to 1.0.