Reputation: 21396
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" );
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...
Upvotes: 3
Views: 2046
Reputation: 360662
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();
Upvotes: 3