Documentation

Horde_Image_Effect_Gd_Unsharpmask extends Horde_Image_Effect
in package

Unsharp mask Image effect.

Unsharp mask algorithm by Torstein Hønsi 2003 thoensi@netcom.no from: http://www.vikjavev.com/hovudsida/umtestside.php

Tags
author

Torstein Hønsi thoensi@netcom.no

author

Michael J. Rubinsky mrubinsk@horde.org

category

Horde

copyright

2003 Torstein Hønsi thoensi@netcom.no

copyright

2007-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL-2.1

Table of Contents

$_image  : Horde_Image
The bound Horde_Image object
$_logger  : mixed
Logger.
$_params  : array<string|int, mixed>
Valid parameters: - radius: (float) Thickness of the sharpened edge. Should be greater than sigma (or 0, and imagick will attempt to auto choose).
__construct()  : mixed
Effect constructor.
apply()  : mixed
Applies the effect.
factory()  : Horde_Image_Effect
Effect factory.
setImageObject()  : mixed
Bind this effect to a Horde_Image object.
setLogger()  : mixed
Attaches a logger.

Properties

$_logger

Logger.

protected mixed $_logger

$_params

Valid parameters: - radius: (float) Thickness of the sharpened edge. Should be greater than sigma (or 0, and imagick will attempt to auto choose).

protected array<string|int, mixed> $_params = array('amount' => 0, 'radius' => 0, 'threshold' => 0)

In general, radius should be roughly output dpi / 150. So for display purposes a radius of 0.5 is suggested.

  • amount: (float) Amount of the difference between original and the blur image that gets added back to the original. Can be thought of as the "strength" of the effect. Too high may cause blocking of shadows and highlights. Given a decimal value indicating percentage, e.g. 1.2 = 120%
  • threshold: (float) Determines how large the brightness delta between adjacent pixels needs to be to sharpen the edge. Larger values == less sharpening. Useful for preventing noisy images from being oversharpened.

Methods

__construct()

Effect constructor.

public __construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
$params : array<string|int, mixed> = array()

Any parameters for the effect. Parameters are documented in each subclass.

Return values
mixed

apply()

Applies the effect.

public apply() : mixed
Return values
mixed

factory()

Effect factory.

public static factory(string $type, string $driver, array<string|int, mixed> $params) : Horde_Image_Effect
Parameters
$type : string

An effect name.

$driver : string

An image driver name.

$params : array<string|int, mixed>

Any effect parameters.

Return values
Horde_Image_Effect

An effect instance.

setImageObject()

Bind this effect to a Horde_Image object.

public setImageObject(Horde_Image $image) : mixed
Parameters
$image : Horde_Image

The Horde_Image object

Return values
mixed

setLogger()

Attaches a logger.

public setLogger(Horde_Log_Logger $logger) : mixed
Parameters
$logger : Horde_Log_Logger

A logger.

Return values
mixed

Search results