-strip ".$gravity." ".$blur." '".$cachefile."'"); } else { exec("convert '".$file."' memory 200 -limit map 200 ".$addBackgroundtoPDF." -resize '".$width."X".$height."^' -strip ".$gravity." -crop ".$width."X".$height."+0+0 +repage ".$blur." '".$cachefile."'"); } } if(file_exists($_SERVER['DOCUMENT_ROOT']."/hooks/showthumb_watermark.php")){ include($_SERVER['DOCUMENT_ROOT']."/hooks/showthumb_watermark.php"); } if (function_exists('exif_imagetype')) { $imgType = exif_imagetype($cachefile); }else{ $imageType = explode('.',$cachefile); $imgType = $imageType[count($imageType)-1]; } $fileSize = filesize($cachefile); header("Content-type: " . image_type_to_mime_type($imgType)); header("Accept-Ranges: bytes" ); header("Last-Modified: " . gmdate('D, d M Y H:i:s', filemtime($cachefile)) . " GMT"); header("Content-Length: " . $fileSize); header("Cache-Control: max-age=9999, must-revalidate"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 9999) . "GMT" ); readfile($cachefile); ?>