<?php include_once 'imagick.php'; $im = imagegrabscreen(); imagepng($im, "myscreenshot.png"); imagedestroy($im); $im = new imagick('myscreenshot.png'); $imageprops = $im->getimagegeometry(); $width = $imageprops['width']; $height = $imageprops['height']; if($width > $height){ $newheight = 80; $newwidth = (80 / $height) * $width; }else{ $newwidth = 80; $newheight = (80 / $width) * $height; } $im->resizeimage($newwidth,$newheight, imagick::filter_lanczos, 0.9, true); $im->cropimage (80,80,0,0); $im->writeimage( "test.jpg" ); echo '<img src="test.jpg">'; ?> the image being saved properly. getting error:
fatal error: cannot override final method exception::__clone() in c:\xampp\htdocs\
Comments
Post a Comment