class Effects implements EffectsInterface

Effects implementation using the Gmagick PHP extension.

Methods

__construct(Gmagick $gmagick)

Initialize the instance.

$this
gamma(float $correction)

Apply gamma correction.

$this
negative()

Invert the colors of the image.

$this
grayscale()

Grayscale the image.

$this
colorize(ColorInterface $color)

Colorize the image.

$this
sharpen()

Sharpens the image.

$this
blur(float|int $sigma = 1)

Blur the image.

$this
brightness(int $brightness)

Changes the brightness of the image.

$this
convolve(Matrix $matrix)

Convolves the image.

Details

at line 36
__construct(Gmagick $gmagick)

Initialize the instance.

Parameters

Gmagick $gmagick

at line 46
$this gamma(float $correction)

Apply gamma correction.

Parameters

float $correction

Return Value

$this

Exceptions

RuntimeException

See also

EffectsInterface::gamma

at line 62
$this negative()

Invert the colors of the image.

Return Value

$this

Exceptions

RuntimeException

See also

EffectsInterface::negative

at line 82
$this grayscale()

Grayscale the image.

Return Value

$this

Exceptions

RuntimeException

See also

EffectsInterface::grayscale

at line 98
$this colorize(ColorInterface $color)

Colorize the image.

Parameters

ColorInterface $color

Return Value

$this

Exceptions

RuntimeException

See also

EffectsInterface::colorize

at line 108
$this sharpen()

Sharpens the image.

Return Value

$this

Exceptions

RuntimeException

See also

EffectsInterface::sharpen

at line 118
$this blur(float|int $sigma = 1)

Blur the image.

Parameters

float|int $sigma

Return Value

$this

Exceptions

RuntimeException

See also

EffectsInterface::blur

at line 134
$this brightness(int $brightness)

Changes the brightness of the image.

Parameters

int $brightness The level of brightness (-100 (black) to 100 (white))

Return Value

$this

Exceptions

RuntimeException

See also

EffectsInterface::brightness

at line 160
$this convolve(Matrix $matrix)

Convolves the image.

Parameters

Matrix $matrix The matrix from which derive the convolution kernel

Return Value

$this

Exceptions

RuntimeException

See also

EffectsInterface::convolve