Touch/mouse over to see original View modified in new window.
Image
Contrast type
function contrastImage($imagePath, $contrastType)
{
    $imagick = new \Imagick(realpath($imagePath));
    if ($contrastType != 2) {
        $imagick->contrastImage($contrastType);
    }

    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}