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 中,類別可以從其他類別繼承,這使它們能夠存取父類別的屬性並...

03 Jan 2025
了解欄位初始化問題在您的程式碼中,您有一個儲存庫類別 (DinnerRepository) 和一個服務類別 (Service),它使用...


熱工具

熱門文章
Windows 11 KB5054979中的新功能以及如何解決更新問題
03 Apr 2025
故障排查
如何修復KB5055523無法在Windows 11中安裝?
10 Apr 2025
故障排查
Inzoi:如何申請學校和大學
02 Apr 2025
手游攻略
如何修復KB5055518無法在Windows 10中安裝?
10 Apr 2025
故障排查
在哪裡可以找到Atomfall中的站點辦公室鑰匙
02 Apr 2025
手游攻略