readImage(getcwd().'/example.jpg'); $im->setImageColorSpace( Imagick::COLORSPACE_GRAY ); header( "Content-Type: image/jpeg" ); echo $im; ?>