getimagepage(); $width = $size[width]; $height = $size[height]; if ( $shave_x*2 > $width ) { $error = "X is too big
"; } if ( $shave_y*2 > $height ) { $error .= "Y is too big"; } if ( $error ) { $_SESSION[error] = "$error"; header("location:$self"); exit; } $count = 0; foreach ($image as $frame) { try { $frame->shaveimage($shave_x, $shave_y); } catch ( exception $e ) { $error .= "X or Y was too big for frame $count
"; } $count++; } if ( $error ) { $_SESSION[error] = $error; header("location:$self"); exit; } $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[shave_x] = $shave_x; $_SESSION[shave_y] = $shave_y; header("Location: display.php"); exit; } ######### end Shave include("top.php"); ?>

X ">
Y ">
Description
Shave pixels from the edge of an image.
X
X must be less than half the width
Y
Y must be less than half the height