getColors() public method

Return all of the colors in the palette in an array format
public getColors ( integer | string $format = Pop\Image\Imagick::HEX ) : array
$format integer | string
return array
コード例 #1
0
ファイル: ImagickTest.php プロジェクト: nicksagona/PopPHP
 public function testGetColors()
 {
     $i = new Imagick(__DIR__ . '/../tmp/test.gif');
     $hex = $i->getColors();
     $rgb = $i->getColors(false);
     $this->assertEquals(16, count($hex));
     $this->assertEquals(16, count($rgb));
     $this->assertTrue(in_array('113405', $hex));
     $this->assertTrue(in_array('17,52,5', $rgb));
 }