error_reporting(0);
include("functions.php");
$h1 = "DJ Mike's Image Maker 2";
$h2 = "Transverse/Transpose";
if ( isset($_GET[option]) )
{
$image = new Imagick($_SESSION[path]);
$image = $image->coalesceImages();
$option = $_GET[option];
if ( ($option == "Transverse") )
{ foreach ($image as $frame) { $frame->transverseImage(); } }
if ( ($option == "Transpose") )
{ foreach ($image as $frame) { $frame->transposeImage(); } }
$format = strtolower( $image->getimageformat() );
$path = "temp/$ID.$_SESSION[views].$format";
$frames = $image->getNumberImages();
if ( $frames > 1) { $image->writeImages("$path", TRUE); }
else { $image->writeImage("$path"); }
$_SESSION[path] = $path;
header("location:display.php");
exit;
}
include("top.php");
?>