python – converting tiff to gif in php – Education Career Blog

I need to convert tiff file to gif . can some one give me php or python script to do that ?

,

Try phpThumb in conjunction with the Imagick extension in PHP.

,

http://php.net/manual/en/book.imagick.php

try
{
        $image = '/tmp/image.tiff';    
        $im = new Imagick();    
        $im->pingImage( $image );    
        $im->readImage( $image );    
        $im->setImageFormat( 'gif' );    
        $im->writeImage( '/tmp/image.gif' );
}
catch(Exception $e)
{
        echo $e->getMessage();
}

Leave a Comment