Bånder

ImagickDriver extends Driver
in package

Table of Contents

Properties

$height  : int
Image height.
$image  : Imagick
$maxSize  : int
$width  : int
Image width.

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

$width

Image width.

public int $width

Methods

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>}|false

colors()

public colors(string $path) : array<int, array<int, array{0: float, 1: float, 2: float}>>
Parameters
$path : string
Tags
throws
UnableToGetColorException
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
throws
UnableToCreateImageException
Return values
static

pixel()

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
throws
UnableToSetPixelException
Return values
bool

read()

Reads an image from a path and returns an image resource based on the driver.

public read(string $path) : Imagick
Parameters
$path : string
Tags
throws
UnsupportedFileException
Return values
Imagick

resize()

Resizes the image to a smaller version.

public resize(Imagick $image) : Imagick
Parameters
$image : Imagick
Return values
Imagick

scale()

Get resizing factor.

public scale(positive-int $width, positive-int $height) : float
Parameters
$width : positive-int
$height : positive-int
Return values
float

size()

Retrieves the image's width and height.

public size(Imagick $image) : array{0: positive-int, 1: positive-int}
Parameters
$image : Imagick
Tags
throws
ImagickException
Return values
array{0: positive-int, 1: positive-int}

        
On this page

Search results