bitandblack / iccprofile
Reading ICC Color Profiles
Fund package maintenance!
Buymeacoffee
Requires
- php: >=8.2
- bitandblack/colors: ^2.0
Requires (Dev)
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^11.0
- rector/rector: ^1.0
- symplify/easy-coding-standard: ^12.0
README
Bit&Black ICC ColorProfile
Reading ICC Color Profiles. This library is based on the work of Andreas Heigl in org_heigl/color.
Installation
This library is made for the use with Composer. Add it to you project by running $ composer require bitandblack/iccprofile
.
Usage
Set up an IccProfile
object with the path to a profile or alternatively a string with the profile itself:
<?php
use BitAndBlack\IccProfile\IccProfile;
$iccProfile = new IccProfile('/path/to/SomeProfile.icc');
Access the profile's information then:
<?php
$space = $iccProfile->getSpace();
This will get something like RGB
.
Using the internal profiles
This library holds a lot of ICC profiles in the data
folder. To load one of them, you can use the File
class:
<?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);
Help
If you have any questions feel free to contact us under hello@bitandblack.com
.
Further information about Bit&Black can be found under www.bitandblack.com.