100 ) { $compress_quality = 100; } ############# $image = new Imagick($_SESSION[path]); foreach ($image as $frame) { $frame->setCompression(Imagick::COMPRESSION_JPEG); $frame->setCompressionQuality($compress_quality); } $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[compress_quality] = $compress_quality; header("Location: display.php?"); exit; } ######### end Compress include("top.php"); ?>

identifyimage(TRUE); $data = $data[rawOutput]; $q = preg_match("@Quality: [\d]{1,3}@", "$data", $match); $q = "$match[0]"; } ?> "; } else { echo ""; } ?>
Current $q
Cannot be compressed
Quality:   
Description
Reduce the quality and file size of a JPEG. Has no effect on GIF's or PNG's
Quality
Range from 1 to 100. 1 is low. 100 is high