<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagickpixel.getcolorcount">
 <refnamediv>
  <refname>ImagickPixel::getColorCount</refname>
  <refpurpose>Returns the color count associated with this color</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <type>int</type><methodname>ImagickPixel::getColorCount</methodname>
   <void/>
  </methodsynopsis>
  <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="parameters">
  &reftitle.parameters;
  &no.function.parameters;
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the color count as an integer on success, throws
  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>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
