A week ago I converted a PDF to a JPG and got great results:
http://www.frontpages.ca/show.php?p=409
Today however, when I was uploading other PDFs and conerting them to JPGs, the images produced were terrible. Re-converting the other PDF resulted in this horrible image:
http://www.frontpages.ca/show.php?p=164
You can click on the image on that page to view the original PDF if that's helpful, but any PDFs are giving the same results. Any idea what could be causing this? We're using the following function - any help would be greatly appreciated.
Code: Select all
function make_thumbs($uploadedFpId,$issueFileprefix) {
$issuePathprefix = $_SERVER['DOCUMENT_ROOT'].'/frontpages/fp/'.$issueFileprefix;
exec('convert '.$issuePathprefix.'.pdf[0] -colorspace RGB -density 100x100 -quality 90 '.$issuePathprefix.'.jpg');
exec('convert '.$issuePathprefix.'.jpg -thumbnail 100x146 '.$issuePathprefix.'_sm.jpg'); // make thumbnail
exec('convert '.$issuePathprefix.'.jpg -thumbnail 500x1000 '.$issuePathprefix.'.jpg'); // make correct size of preview
}