I've included the ColorsOfImage PHP class from humanmade into my Codeigniter as a new library.
Now when I load the library in a controller, I can use the functions of the class without any problems, but I always get the following error when loading the library, which says, that the $image
in the __construct
function is empty!?
Here is the __construct function of the class:
public function __construct( $image, $precision = 10, $maxnumcolors = 5, $trueper = true ) {
$this->image = $image;
$this->maxnumcolors = $maxnumcolors;
$this->trueper = $trueper;
$this->getImageSize();
$this->precision = $precision;
$this->readPixels();
$this->_excluded_colors[] = $this->getBackgroundColor();
}