extractor提取顏色的PHP庫
<?php namespace League\ColorExtractor\Test; use League\ColorExtractor\Color; use League\ColorExtractor\ColorExtractor; use League\ColorExtractor\Palette; class PaletteTest extends \PHPUnit_Framework_TestCase { protected $jpegPath = './tests/assets/test.jpeg'; protected $gifPath = './tests/assets/test.gif'; protected $pngPath = './tests/assets/test.png'; protected $transparentPngPath = './tests/assets/red-transparent-50.png'; public function testJpegExtractSingleColor() { $extractor = new ColorExtractor(Palette::fromFilename($this->jpegPath)); $colors = $extractor->extract(1); $this->assertInternalType('array', $colors); $this->assertCount(1, $colors); $this->assertEquals(15985688, $colors[0]); } public function testGifExtractSingleColor() { $extractor = new ColorExtractor(Palette::fromFilename($this->gifPath)); $colors = $extractor->extract(1); $this->assertInternalType('array', $colors); $this->assertCount(1, $colors); $this->assertEquals(12022491, $colors[0]); }
本庫的13個特點
1.色彩抓取讓你挑,即時用相機偵測和辨識顏色。
2.應用程式是專為圖形設計人員和顏色百葉窗。
3.顏色名稱,色調,RGB和HSV的表示法。
(沒有點選捕捉為必填項)即時色彩診斷。
4.設定拍攝的顏色堅固的桌布。
5.智能色彩穩定。
6.智慧自動對焦。
7.相機手電筒,接通/關斷。
8.支援所有手機的相機(前後)。
9.即時顏色的挑選與保存。
10.色彩,顏色名稱,RGB十六進制,RGB十進制和HSV表示。
11.截至1300年顏色及16種基本顏色分類。
12.即時分享和匯出捕獲的顏色。
13.嵌入式幫助。
免責聲明
本站所有資源皆由網友貢獻或各大下載網站轉載。請自行檢查軟體的完整性!本站所有資源僅供學習參考。請不要將它們用於商業目的。否則,一切後果都由您負責!如有侵權,請聯絡我們刪除。聯絡方式:admin@php.cn
相關文章

21 Jul 2016
php錄入頁面中動態從資料庫中提取資料的實作。摘要:用php製作動態web頁面時,在提交伺服器之前,讓php根據使用者在目前頁面上輸入的某一欄位的值立即從資料庫中取出相關的其它欄位的值

24 Dec 2024
了解 Python 類別繼承在 Python 中,類別可以從其他類別繼承,這使它們能夠存取父類別的屬性並...

21 Jul 2016
PHP5試用(二)。抽象類別 抽象類別不能被實例化。 抽象類別與其它類別一樣,允許定義變數及方法。 抽象類別同樣可以定義一個抽象的方法,抽象類別的方法不會被執


Hot Tools

熱門文章
丟失記錄:Bloom&Rage -Corey和Dylan的鎖組合
19 Feb 2025
手游攻略
王國來:拯救2-婚禮要買的衣服
05 Feb 2025
手游攻略
丟失的記錄:Bloom&Rage-成就/獎杯指南
19 Feb 2025
手游攻略
Hello Kitty Island冒險:重新啟動機器人任務演練
16 Feb 2025
手游攻略
王國來:拯救2-如何獲得Comfrey
07 Feb 2025
手游攻略