function blueShiftImage($image_path, $blueShift) { $imagick = new \Imagick(realpath($image_path)); $imagick->blueShiftImage($blueShift); header("Content-Type: image/jpeg"); echo $imagick->getImageBlob(); }