svn: /phpdoc/en/trunk/reference/imagick/imagickpixel/ getcolorcount.xml
| From: | Dan Ackroyd | Date: | Sun, 19 Jun 2016 11:36:16 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/imagick/imagickpixel/ getcolorcount.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-14206@lists.php.net to get a copy of this message | ||
danack Sun, 19 Jun 2016 11:36:16 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=339398
Log:
Added words for ImagickPixel::getColorCount
Changed paths:
U phpdoc/en/trunk/reference/imagick/imagickpixel/getcolorcount.xml
Modified: phpdoc/en/trunk/reference/imagick/imagickpixel/getcolorcount.xml
===================================================================
--- phpdoc/en/trunk/reference/imagick/imagickpixel/getcolorcount.xml 2016-06-19 06:36:31 UTC (rev
339397)
+++ phpdoc/en/trunk/reference/imagick/imagickpixel/getcolorcount.xml 2016-06-19 11:36:16 UTC (rev
339398)
@@ -12,10 +12,14 @@
<type>int</type><methodname>ImagickPixel::getColorCount</methodname>
<void/>
</methodsynopsis>
- &warn.undocumented.func;
<para>
Returns the color count associated with this color.
</para>
+ <para>The color count is the number of pixels in the image that have the same color as this
ImagickPixel.
+ </para>
+ <para>
+ ImagickPixel::getColorCount appears to only work for ImagickPixel objects created through
Imagick::getImageHistogram()
+ </para>
</refsect1>
<refsect1 role="returnvalues">
@@ -25,6 +29,33 @@
ImagickPixelException on failure.
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>ImagickPixel <function>getColorCount</function></title>
+ <programlisting role="php">
+ <![CDATA[
+<?php
+ $imagick = new \Imagick();
+ $imagick->newPseudoImage(640, 480, "magick:logo");
+ $histogramElements = $imagick->getImageHistogram();
+ $lastColor = array_pop($histogramElements);
+ echo "Last pixel color count is: ".$lastColor->getColorCount();
+?>
+]]>
+ </programlisting>
+ <para>
+The output for this will be similar to:
+ </para>
+ <screen role="php">
+<![CDATA[
+Last pixel color count is: 256244
+]]>
+ </screen>
+ </example>
+ </para>
+</refsect1>
</refentry>