X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl-cms.git;a=blobdiff_plain;f=cms_images_autoresize.php;h=8c98519e3f7fad988bc03582e30d63051dcd4b39;hp=922b3cf42b30b07c2d8dd1f059c79f203bc44ce8;hb=HEAD;hpb=e7424acd48ed670f1b8bd8d7c1ff69b37ce6334b diff --git a/cms_images_autoresize.php b/cms_images_autoresize.php index 922b3cf..8c98519 100644 --- a/cms_images_autoresize.php +++ b/cms_images_autoresize.php @@ -1,76 +1,75 @@ '" - ); + imagemagick_convert($in_path, $out_path, + '-geometry ' + . $width + . 'x' + . ($width * 2) + . "'>'" + ); - # done! kill the lock - fclose($lock); - unlink($lock_path); + # done! kill the lock + fclose($lock); + unlink($lock_path); - if (!headers_sent()) { - header('Content-Type: ' . ($ext = 'jpg' ? 'image/jpeg' : 'image/png')); - readfile($out_path); - } + if (!headers_sent()) { + header('Content-Type: ' . ($ext = 'jpg' ? 'image/jpeg' : 'image/png')); + readfile($out_path); + } } cms_images_autoresize_main();