Documentation

Palette
in package
implements Countable, IteratorAggregate

Interfaces, Classes, Traits and Enums

Countable
IteratorAggregate

Table of Contents

$colors  : array<string|int, mixed>
count()  : int
fromFilename()  : Palette
fromGD()  : Palette
getColorCount()  : int
getIterator()  : ArrayIterator
getMostUsedColors()  : array<string|int, mixed>
__construct()  : mixed

Properties

$colors

protected array<string|int, mixed> $colors

Methods

count()

public count() : int
Return values
int

fromFilename()

public static fromFilename(string $filename[, int|null $backgroundColor = null ]) : Palette
Parameters
$filename : string
$backgroundColor : int|null = null
Return values
Palette

fromGD()

public static fromGD(resource $image[, int|null $backgroundColor = null ]) : Palette
Parameters
$image : resource
$backgroundColor : int|null = null
Tags
throws
InvalidArgumentException
Return values
Palette

getColorCount()

public getColorCount(int $color) : int
Parameters
$color : int
Return values
int

getIterator()

public getIterator() : ArrayIterator
Return values
ArrayIterator

getMostUsedColors()

public getMostUsedColors([int $limit = null ]) : array<string|int, mixed>
Parameters
$limit : int = null

= null

Return values
array<string|int, mixed>

__construct()

protected __construct() : mixed
Return values
mixed

Search results