class Vectorize extends EffectQualifier

Class Vectorize

Methods

numOfColors(int $numOfColors = null)

Limits the number of colors in the image.

detailsLevel(float $level)

Controls the level of detail.

despeckleLevel(float $size)

Suppresses speckles up to the given size.

paths(int $value)

Controls the Bezier curve optimization.

cornersLevel(int $threshold)

Controls the corner threshold. 100 for no smoothing (polygon corners), 0 for completely smooth corners.

__construct(int $colors = null, float $detail = null, float $despeckle = null, int $corners = null, int $paths = null)

Vectorize constructor.

Details

$this numOfColors(int $numOfColors = null)

Limits the number of colors in the image.

Parameters

Name Type Description
$numOfColors int The number of colors. (Range: 2 to 30, Server default: 10)

Return Value

$this

$this detailsLevel(float $level)

Controls the level of detail.

Parameters

Name Type Description
$level float The level of detail. Specify either a percentage of the original image (Range: 0.0 to 1.0) or an absolute number of pixels (Range: 0 to 1000). (Server default: 300)

Return Value

$this

$this despeckleLevel(float $size)

Suppresses speckles up to the given size.

Parameters

Name Type Description
$size float The size of speckles to suppress. Specify either a percentage of the original image (Range: 0.0 to 1.0) or an absolute number of pixels (Range: 0 to 100, Server default: 2)

Return Value

$this

$this paths(int $value)

Controls the Bezier curve optimization.

Parameters

Name Type Description
$value int The optimization value. Specify 100 for least optimization and the largest file. (Range: 0 to 100, Server default: 100).

Return Value

$this

$this cornersLevel(int $threshold)

Controls the corner threshold. 100 for no smoothing (polygon corners), 0 for completely smooth corners.

Parameters

Name Type Description
$threshold int The corner threshold. Specify 100 for no smoothing (polygon corners), 0 for completely smooth corners. (Range: 0 to 100, Default: 25)

Return Value

$this

__construct(int $colors = null, float $detail = null, float $despeckle = null, int $corners = null, int $paths = null)

Vectorize constructor.

Parameters

Name Type Description
$colors int The number of colors. (Range: 2 to 30, Server default: 10)
$detail float The level of detail. Specify either a percentage of the original image (Range: 0.0 to 1.0) or an absolute number of pixels (Range: 0 to 1000). (Server default: 300)
$despeckle float The size of speckles to suppress. Specify either a percentage of the original image (Range: 0.0 to 1.0) or an absolute number of pixels (Range: 0 to 100, Server default: 2)
$corners int The corner threshold. Specify 100 for no smoothing (polygon corners), 0 for completely smooth corners. (Range: 0 to 100, Default: 25)
$paths int The optimization value. Specify 100 for least optimization and the largest file. (Range: 0 to 100, Server default: 100).

Constants

VALUE_CLASS