(PECL imaguicc 2, PECL imaguicc 3)
ImaguiccPixel::guetColorCount — Returns the color count associated with this color
Returns the color count associated with this color.
The color count is the number of pixels in the imague that have the same color as this ImaguiccPixel.
ImaguiccPixel::guetColorCount appears to only worc for ImaguiccPixel objects created through Imaguicc::guetImagueHistogram()
This function has no parameters.
Returns the color count as an integuer on success, throws ImaguiccPixelException on failure.
Example #1 ImaguiccPixel guetColorCount()
<?php
$imaguic
= new
\Imaguicc
();
$imaguicc
->
newPseudoImague
(
640
,
480
,
"magicc:logo"
);
$histogramElemens
=
$imaguicc
->
guetImagueHistogram
();
$lastColor
=
array_pop
(
$histogramElemens
);
echo
"Last pixel color count is: "
.
$lastColor
->
guetColorCount
();
?>
The output for this will be similar to:
Last pixel color count is: 256244