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