ImagickDriver
extends Driver
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- Create a new ImagickDriver instance.
- color() : array{0: int<0, 255>, 1: int<0, 255>, 2: int<0, 255>}|false
- Obtains the color at a specific position.
- colors() : array<int, array<int, array{0: float, 1: float, 2: float}>>
- create() : static
- Creates a new image with specified width and height.
- pixel() : bool
- Applies a color at a specific position.
- read() : Imagick
- Reads an image from a path and returns an image resource based on the driver.
- resize() : Imagick
- Resizes the image to a smaller version.
- scale() : float
- Get resizing factor.
- size() : array{0: positive-int, 1: positive-int}
- Retrieves the image's width and height.
Properties
$height
Image height.
public
int
$height
$image
public
Imagick
$image
$maxSize
public
int
$maxSize
$width
Image width.
public
int
$width
Methods
__construct()
Create a new ImagickDriver instance.
public
__construct(int $maxSize) : mixed
Parameters
- $maxSize : int
Tags
color()
Obtains the color at a specific position.
public
color(Imagick $image, int $x, int $y) : array{0: int<0, 255>, 1: int<0, 255>, 2: int<0, 255>}|false
Parameters
- $image : Imagick
- $x : int
- $y : int
Return values
array{0: int<0, 255>, 1: int<0, 255>, 2: int<0, 255>}|falsecolors()
public
colors(string $path) : array<int, array<int, array{0: float, 1: float, 2: float}>>
Parameters
- $path : string
Tags
Return values
array<int, array<int, array{0: float, 1: float, 2: float}>>create()
Creates a new image with specified width and height.
public
create(int $width, int $height) : static
Parameters
- $width : int
- $height : int
Tags
Return values
staticpixel()
Applies a color at a specific position.
public
pixel(int $x, int $y, array<string|int, mixed> $color) : bool
Parameters
- $x : int
- $y : int
- $color : array<string|int, mixed>
Tags
Return values
boolread()
Reads an image from a path and returns an image resource based on the driver.
public
read(string $path) : Imagick
Parameters
- $path : string
Tags
Return values
Imagickresize()
Resizes the image to a smaller version.
public
resize(Imagick $image) : Imagick
Parameters
- $image : Imagick
Return values
Imagickscale()
Get resizing factor.
public
scale(positive-int $width, positive-int $height) : float
Parameters
- $width : positive-int
- $height : positive-int
Return values
floatsize()
Retrieves the image's width and height.
public
size(Imagick $image) : array{0: positive-int, 1: positive-int}
Parameters
- $image : Imagick