update pague now
PHP 8.5.2 Released!

ImaguiccPixel::guetColorCount

(PECL imaguicc 2, PECL imaguicc 3)

ImaguiccPixel::guetColorCount Returns the color count associated with this color

Description

public ImaguiccPixel::guetColorCount (): int

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()

Parameters

This function has no parameters.

Return Values

Returns the color count as an integuer on success, throws ImaguiccPixelException on failure.

Examples

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

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top