
 François Chérubin - 2017-12-13 00:42:15
when you do this
public function getColorFromImage($imagePath,$x = 0,$y = 0)
    {
        if (isset($imagePath))
        {
..
        }
        else die();
    }
I think is better for debugging and to reading script to do like this 
public function getColorFromImage($imagePath,$x = 0,$y = 0)
    {
        if (!isset($imagePath) && $imagePath=="") throw new Exception("thank to put a real path");
..
    }