function motionBlurImage($image_path, $radius, $sigma, $angle, $channel) { $imagick = new \Imagick(realpath($image_path)); $imagick->motionBlurImage($radius, $sigma, $angle, $channel); header("Content-Type: image/jpeg"); echo $imagick->getImageBlob(); }