pdf thumbnail imagemagick php not working
I am using imagemagick and ghostscript in my windows pc running php5 in apache.
I tried
<?php
$im = new imagick('test.pdf[0]');
$im->setImageFormat( "jpg" );
header( "Content-Type: image/jpeg" );开发者_C百科
echo $im;
?>
and found its not working.
My php info file shows imagick working...
I am trying to generate a thumbnail without saving it in the server hard drive...
You're outputting the imagick OBJECT, not the image you're dealing with. To output as a .jpg, you'd need to do
echo $im->getImageBlob();
精彩评论