error_reporting(0); include("functions.php"); $h1 = "DJ Mike's Image Maker 2"; $h2 = "Spread"; ##### Start spread if ( $_GET[spread] ) { $spread = trim($_GET[spread]); ##### Validate spread if ( preg_match( "#[^0-9\.]#", "$spread", $x) && ($spread < 0) ) { $_SESSION[error] = "Enter positive numbers only"; header("location:$self"); } ############# $image = new Imagick($_SESSION[path]); foreach ($image as $frame) { $frame->spreadImage($spread); } $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[spread] = $spread; header("location:display.php"); exit; } ######### end spread include("top.php"); ?>