ImagickPixel::getColor() takes an int, not a bool

Closes GH-262.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351875 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2020-12-04 15:32:16 +00:00
parent 02639373d9
commit 9bf67e6ba6

View file

@ -26,8 +26,54 @@
<term><parameter>normalized</parameter></term>
<listitem>
<para>
Normalize the color values
Normalize the color values. Possible values are <literal>0</literal>,
<literal>1</literal> or <literal>2</literal>.
</para>
<table>
<title>
List of possible values for <parameter>normalized</parameter>
</title>
<tgroup cols="2">
<thead>
<row>
<entry><parameter>normalized</parameter></entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<constant>0</constant>
</entry>
<entry>
The RGB values are returned as <type>int</type>s in the range <literal>0</literal>
to <literal>255</literal> (inclusive.)
The alpha value is returned as <type>int</type> and is either <literal>0</literal>
or <literal>1</literal>.
</entry>
</row>
<row>
<entry>
<constant>1</constant>
</entry>
<entry>
The RGBA values are returned as <type>float</type>s in the range <literal>0</literal>
to <literal>1</literal> (inclusive.)
</entry>
</row>
<row>
<entry>
<constant>2</constant>
</entry>
<entry>
The RGBA values are returned as <type>int</type>s in the range <literal>0</literal>
to <literal>255</literal> (inclusive.)
</entry>
</row>
</tbody>
</tgroup>
</table>
</listitem>
</varlistentry>
</variablelist>
@ -37,8 +83,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
An array of channel values, each normalized if &true; is given as param. Throws
ImagickPixelException on error.
An array of channel values. Throws ImagickPixelException on error.
</para>
</refsect1>
@ -62,7 +107,7 @@ $colorInfo = $color->getColor();
echo "Standard values".PHP_EOL;
print_r($colorInfo);
$colorInfo = $color->getColor(true);
$colorInfo = $color->getColor(1);
echo "Normalized values:".PHP_EOL;
print_r($colorInfo);