getimageformat() ); $path = "temp/$ID.$_SESSION[views].$format"; ################################## if ( $_GET[rotate_left] ) {$rotate_angle = -90; } if ( $_GET[rotate_right] ) { $rotate_angle = 90; } if ( $_GET[angle] ) { $rotate_angle = (int)$_GET[rotate_angle]; } ## validate color ## $rotate_color = trim($_GET[rotate_color] ); if ($rotate_color == "" ) { $rotate_color = "transparent"; } $rotate_color = colors( $rotate_color, "validate" ); if ( !$rotate_color ) { $_SESSION[error] = "Color is invalid"; header("location:$self"); exit; } ## end validate ## # rotate foreach ($image as $frame) { $frame->rotateImage( "$rotate_color", $rotate_angle ); } ## $frames = $image->getNumberImages(); if ( $frames > 1) { $image->writeImages("$path", TRUE); } else { $image->writeImage("$path"); } ################################## # save data $_SESSION[path] = $path; $_SESSION[rotate_color] = "$rotate_color"; $_SESSION[rotate_angle] = $rotate_angle; header("Location: display.php"); exit; } include("top.php"); ?>
Rotate Angle ">
Background Color ">
Directions
Rotate an Image. Rotate Left rotates counterclockwise. Rotate Right rotates clockwise. For background color, enter a valid color name or hex such as red and #0000ff. Leave blank for transparent. Transparent doesn't work for JPEG's, only GIF's and PNG's