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