更多>
最新下载
24小时阅读排行榜
- 1 Golang如何查看测试覆盖率 Go test cover使用教程
- 2 如何使用Golang处理高并发网络请求_Golang goroutine池与channel实践
- 3 php模拟post请求传数组参数_php数组post发送教程【步骤】
- 4 mysql安装时配置数据库备份与恢复路径
- 5 php怎样判断数组下标类型_php下标类型识别技巧【技巧】
- 6 Go测试中如何跳过用例 Golang Skip用法说明
- 7 css 响应式设计中的表单优化_自适应调整表单布局
- 8 Golang如何实现HTTP长连接_Golang HTTP Keep-Alive实现
- 9 php数组怎样筛选中文元素项_php中文数组筛选法【教程】
- 10 mysql中InnoDB锁的实现与内部机制
- 11 C++ set怎么去重 C++ 红黑树容器自动排序去重机制【STL】
- 12 C++ 怎么获取系统时间戳 C++ time与chrono转换【计时】
- 13 php实现班级通信录怎么导入定时任务_php定时执行导入法【步骤】
- 14 php模拟post请求调试输出_phppost调试信息打印【步骤】
- 15 c# xUnit 和 NUnit 对异步测试的支持
更多>
最新教程
-
- Node.js 教程
- 16182 2025-08-28
-
- CSS3 教程
- 1546704 2025-08-27
-
- Rust 教程
- 23316 2025-08-27
-
- Vue 教程
- 25780 2025-08-22
-
- PostgreSQL 教程
- 22261 2025-08-21
-
- Git 教程
- 9240 2025-08-21
下载首页 / 类库下载 / 其它类库
<?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
