reference/imagick/imagickpixel/getcolor.xml
f80105b4fc1196bd8d5fecb98d686b580b1ff65d
...
...
@@ -9,8 +9,8 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>array</type><methodname>ImagickPixel::getColor</methodname>
13
-
<methodparam choice="opt"><type>bool</type><parameter>normalized</parameter><initializer>false</initializer></methodparam>
12
+
<modifier>public</modifier> <type>array</type><methodname>ImagickPixel::getColor</methodname>
13
+
<methodparam choice="opt"><type>int</type><parameter>normalized</parameter><initializer>0</initializer></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
Returns the color described by the ImagickPixel object, as an array. If the color has an
...
...
@@ -26,8 +26,54 @@
26
26
<term><parameter>normalized</parameter></term>
27
27
<listitem>
28
28
<para>
29
-
Normalize the color values
29
+
Normalize the color values. Possible values are <literal>0</literal>,
30
+
<literal>1</literal> or <literal>2</literal>.
30
31
</para>
32
+

33
+
<table>
34
+
<title>
35
+
List of possible values for <parameter>normalized</parameter>
36
+
</title>
37
+
<tgroup cols="2">
38
+
<thead>
39
+
<row>
40
+
<entry><parameter>normalized</parameter></entry>
41
+
<entry>Description</entry>
42
+
</row>
43
+
</thead>
44
+
<tbody>
45
+
<row>
46
+
<entry>
47
+
<literal>0</literal>
48
+
</entry>
49
+
<entry>
50
+
The RGB values are returned as <type>int</type>s in the range <literal>0</literal>
51
+
to <literal>255</literal> (inclusive.)
52
+
The alpha value is returned as <type>int</type> and is either <literal>0</literal>
53
+
or <literal>1</literal>.
54
+
</entry>
55
+
</row>
56
+
<row>
57
+
<entry>
58
+
<literal>1</literal>
59
+
</entry>
60
+
<entry>
61
+
The RGBA values are returned as <type>float</type>s in the range <literal>0</literal>
62
+
to <literal>1</literal> (inclusive.)
63
+
</entry>
64
+
</row>
65
+
<row>
66
+
<entry>
67
+
<literal>2</literal>
68
+
</entry>
69
+
<entry>
70
+
The RGBA values are returned as <type>int</type>s in the range <literal>0</literal>
71
+
to <literal>255</literal> (inclusive.)
72
+
</entry>
73
+
</row>
74
+
</tbody>
75
+
</tgroup>
76
+
</table>
31
77
</listitem>
32
78
</varlistentry>
33
79
</variablelist>
...
...
@@ -37,8 +83,7 @@
37
83
<refsect1 role="returnvalues">
38
84
&reftitle.returnvalues;
39
85
<para>
40
-
An array of channel values, each normalized if &true; is given as param. Throws
41
-
ImagickPixelException on error.
86
+
An array of channel values. Throws ImagickPixelException on error.
42
87
</para>
43
88
</refsect1>
44
89

...
...
@@ -62,7 +107,7 @@ $colorInfo = $color->getColor();
62
107
echo "Standard values".PHP_EOL;
63
108
print_r($colorInfo);
64
109

65
-
$colorInfo = $color->getColor(true);
110
+
$colorInfo = $color->getColor(1);
66
111

67
112
echo "Normalized values:".PHP_EOL;
68
113
print_r($colorInfo);
69
114