
function show_image ($mime_type, $image_resized) {
global $quality;
// check to see if we can write to the cache directory
$cache_file = get_cache_file ($mime_type);
if (stristr ($mime_type, 'jpeg')) {
imagejpeg ($image_resized, $cache_file, $quality);
} else {
imagepng ($image_resized, $cache_file, floor ($quality * 0.09));
It looks like you're new here. If you want to get involved, click one of these buttons!