error_reporting(0); include("functions.php"); $h1 = "DJ Mike's Image Maker 2"; $h2 = "Contrast Stretch"; if ( $_GET[contraststretchImage_white] && $_GET[contraststretchImage_black] ) { $white = trim($_GET[contraststretchImage_white]); $black = trim($_GET[contraststretchImage_black]); $white = (float)$white; $black = (float)$black; $image = new Imagick($_SESSION[path]); foreach ($image as $frame) { $frame->contraststretchimage( $white, $black, $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 data $_SESSION[path] = $path; $_SESSION[contraststretchImage_white] = $white; $_SESSION[contraststretchImage_black] = $black; header("location:display.php"); exit; } include("top.php"); ?>