Conversion of Multipage TIF to JPG thumbnail very pixellated
Re: Conversion of Multipage TIF to JPG thumbnail very pixellated
Have you tried calling MagickSetResolution(300, 300); before reading in the TIFF image? Not sure if it helps..
Mikko Koppanen
My blog: http://valokuva.org
My blog: http://valokuva.org
-
- Posts: 2
- Joined: 2011-08-05T10:30:44-07:00
- Authentication code: 8675308
Re: Conversion of Multipage TIF to JPG thumbnail very pixell
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();
}
?>