error_reporting(0); include("functions.php"); $h1 = "DJ Mike's Image Maker 2"; $h2 = "Roll"; ##### Start roll if ( $_GET[roll_x] || $_GET[roll_y] ) { $x = (int)trim($_GET[roll_x]); $y = (int)trim($_GET[roll_y]); $image = new Imagick("$_SESSION[path]"); foreach ($image as $frame) { $frame->rollimage( $x, $y ); } $format = strtolower( $image->getimageformat() ); $path = "temp/$ID.$_SESSION[views].$format"; $frames = $image->getNumberImages(); if ( $frames > 1) { $image->writeImages("$path", TRUE); } else { $image->writeImage("$path"); } # save settings $_SESSION[path] = $path; $_SESSION[roll_x] = $x; $_SESSION[roll_y] = $y; header("location:display.php"); exit; } # end roll include("top.php"); ?>