Touch/mouse over to see original View modified in new window.
Image
Roll X
Roll Y
function rollImage($imagePath, $rollX, $rollY)
{
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->rollimage($rollX, $rollY);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}