Page 1 of 1

Re: Conversion of Multipage TIF to JPG thumbnail very pixellated

Posted: 2009-05-10T14:51:36-07:00
by mkoppanen
Have you tried calling MagickSetResolution(300, 300); before reading in the TIFF image? Not sure if it helps..

Re: Conversion of Multipage TIF to JPG thumbnail very pixell

Posted: 2011-08-05T10:35:17-07:00
by falakniazi
Following code will help to convert multipage tif to jpg thumbnail. For further details can be found at http://sourcecodemania.com/converting-m ... if-in-php/

Code: Select all

<?php
try
{
// Saving every page of a TIFF separately as a JPG thumbnail
$images = new Imagick("testing.tif"); 
foreach($images as $i=>$image) {
    // Providing 0 forces thumbnail Image to maintain aspect ratio
    $image->thumbnailImage(768,0);
    $image->writeImage("page".$i.".jpg");
    echo "<img src='page$i.jpg' alt='images' ></img>";
}
$images->clear();
}
catch(Exception $e)
{
        echo $e->getMessage();
}
?>