Closed Nullmegh closed 7 years ago
oh okay damm it xD
Here you go.... just change the required image adapter you are using
require_once 'lib/ColorThief/ColorThief.php' ;
require_once 'lib/ColorThief/VBox.php' ;
require_once 'lib/ColorThief/PQueue.php' ;
require_once 'lib/ColorThief/CMap.php' ;
require_once 'lib/ColorThief/Image/ImageLoader.php' ;
require_once 'lib/ColorThief/Image/Adapter/IImageAdapter.php' ;
require_once 'lib/ColorThief/Image/Adapter/ImageAdapter.php' ;
require_once 'lib/ColorThief/Image/Adapter/ImagickImageAdapter.php' ;
You can also use any existing PSR-4 autoloader or implement your custom one. See https://www.php-fig.org/psr/psr-4/.
You have to require each PHP files present under the lib folder, one by one. The order is important, but I don't know it, sorry. You have to proceed by trial/error to find it.
Otherwise, you can write a PSR-0 autoloader to replace the one provided by Composer. See also this thread on StackOverflow.