error_reporting(0); include("functions.php"); $h1 = "DJ Mike's Image Maker 2"; $h2 = "Shade"; #### Start shade #### if ( $_GET[shade_azimuth] && $_GET[shade_elevation] ) { $shade_azimuth = (float)trim($_GET[shade_azimuth]); $shade_elevation = (float)trim($_GET[shade_elevation]); $shade_grayscale = (bool)trim($_GET[shade_grayscale]); $image = new Imagick("$_SESSION[path]"); foreach ($image as $frame) { $frame->shadeimage( $shade_grayscale, $shade_azimuth, $shade_elevation); } $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[shade_azimuth] = $shade_azimuth; $_SESSION[shade_elevation] = $shade_elevation; header("location:display.php"); exit; } #### end shade #### include("top.php"); ?>