Transforms an image to a new colorspace.
TODO - there's some code in the eye color resolution demo that should be used here...
TODO - there's some code in the eye color resolution demo that should be used here...
function transformImageColorspace($image_path, $colorSpace, $channel_number)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->transformimagecolorspace($colorSpace);
    $imagick->separateImageChannel($channel_number);
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}