array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'imagickpixel.getcolorasstring.php', 1 => 'ImagickPixel::getColorAsString', ), 'up' => array ( 0 => 'class.imagickpixel.php', 1 => 'ImagickPixel', ), 'prev' => array ( 0 => 'imagickpixel.getcolor.php', 1 => 'ImagickPixel::getColor', ), 'next' => array ( 0 => 'imagickpixel.getcolorcount.php', 1 => 'ImagickPixel::getColorCount', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagickpixel/getcolorasstring.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL imagick 2 >= 2.1.0, PECL imagick 3)
ImagickPixel::getColorAsString — Returns the color as a string
Returns the color of the ImagickPixel object as a string.
Diese Funktion besitzt keine Parameter.
Returns the color of the ImagickPixel object as a string.
Beispiel #1 Basic Imagick::getColorAsString() usage
<?php
//Create an ImagickPixel with the predefined color 'brown'
$color = new ImagickPixel('brown');
$color->setColorValue(Imagick::COLOR_ALPHA, 64 / 256.0);
$colorInfo = $color->getColorAsString();
print_r($colorInfo);
?>
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
rgb(165,42,42)
Hinweis: Alpha not returned
This function does not return the alpha value of the color in the string.