bitandblack/iccprofile
读取ICC色彩配置文件
0.5.1
2022-05-19 10:11 UTC
Requires
- php: >=7.2
- myclabs/php-enum: ^1.0
Requires (Dev)
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^8.0 || ^9.0
- rector/rector: ^0.12
- symplify/easy-coding-standard: ^10.2
README
ICC ColorProfile
读取ICC色彩配置文件。此库基于Andreas Heigl在org_heigl/color中的工作。
安装
此库是为与Composer一起使用而制作的。通过运行$ composer require bitandblack/iccprofile
将其添加到您的项目中。
用法
使用配置文件的路径设置一个ICCProfile
对象,或者也可以使用包含配置文件的字符串
<?php
use BitAndBlack\ICCProfile\ICCProfile;
$iccProfile = new ICCProfile('/path/to/SomeProfile.icc');
然后访问配置文件的信息
<?php
$space = $iccProfile->getSpace();
这将得到类似RGB
的内容。
使用内部配置文件
此库在data
文件夹中保存了许多ICC配置文件。要加载其中之一,您可以使用File
类
<?php
use BitAndBlack\ICCProfile\File;
use BitAndBlack\ICCProfile\FileEnum;
use BitAndBlack\ICCProfile\ICCProfile;
$file = (string) new File(
FileEnum::PROFILE_39L_VDM_U24_754520GM()
);
$iccProfile = new ICCProfile($file);
帮助
如果您有任何问题,请通过hello@bitandblack.com
联系我们。
有关Bit&Black的更多信息,请访问www.bitandblack.com。