update : 2015.11.03
php.shukuma.com

검색:
 
 
Returns the color as a string

ImagickPixel::getColorAsString

(PECL imagick 2.1.0)

ImagickPixel::getColorAsStringReturns the color as a string

설명

string ImagickPixel::getColorAsString ( void )

Returns the color of the ImagickPixel object as a string.

인수

이 함수는 인수가 없습니다.

반환값

Returns the color of the ImagickPixel object as a string.

예제

Example #1 Basic Imagick::getColorAsString() usage

<?php

//Create an ImagickPixel with the predefined color 'brown'
$color = new ImagickPixel('brown');

$color->setColorValue(Imagick::COLOR_ALPHA64 256.0);

$colorInfo $color->getColorAsString();

print_r($colorInfo);
?>

위 예제의 출력:

rgb(165,42,42)

주의

Note: Alpha not returned

This function does not return the alpha value of the color in the string.