Object of class Imagick could not be converted to string