function autoLevelImage($image_path) { $imagick = new \Imagick(realpath($image_path)); $imagick->autoLevelImage(); header("Content-Type: image/jpeg"); echo $imagick->getImageBlob(); }
function autoOrientate($image_path) { $imagick = new \Imagick(realpath("../images/orientation_test.tga")); // $imagick->autoOrient(); header("Content-Type: image/jpeg"); echo $imagick->getImageBlob(); }