Picture manipulation and detection of dominant colors.
You need at least php 7.1 and composer
:
sudo apt install composer
This is the recommended way to use this feature in a non-osf project.
Just add osflab/image
in your composer.json file.
To test the component or participate in its development.
git clone https://github.com/osflab/image.git
cd image && composer update
Unit tests launch:
vendor/bin/runtests
$dominantColors = \Osf\Image\ImageHelper::getColors('mypic.png');