GmagickPixel
class GmagickPixel (View source)
Methods
The GmagickPixel constructor.
Returns the color described by the GmagickPixel object.
Returns the color count associated with this color.
Gets the normalized value of the provided color channel.
Sets the color.
Sets the normalized value of one of the channels.
Details
__construct(string $color = null)
The GmagickPixel constructor.
If a color is specified, the object is constructed and then initialised with that color before being returned.
mixed
getcolor(bool $as_array = null, bool $normalize_array = null)
Returns the color described by the GmagickPixel object.
If the color has an opacity channel set, this is provided as a fourth value in the list.
int
getcolorcount()
Returns the color count associated with this color.
float
getcolorvalue(int $color)
Gets the normalized value of the provided color channel.
GmagickPixel
setcolor(string $color)
Sets the color.
Sets the color described by the GmagickPixel object, with a string (e.g. "blue", "#0000ff", "rgb(0,0,255)", "cmyk(100,100,100,10)", etc.).
GmagickPixel
setcolorvalue(int $color, float $value)
Sets the normalized value of one of the channels.
Sets the value of the specified channel of this object to the provided value, which should be between 0 and 1. This function can be used to provide an opacity channel to a GmagickPixel object.