PHP : Function Reference : Imagick Image Library : Imagick::setImageFormat
devo
A list of formats can be found here: http://www.imagemagick.org/script/formats.php
Formats marked with a W can be output to file with writeImage (capabilities depend on your particular installation of course).
For example:
<?php
// create new imagick object from image.jpg
$im = new Imagick( "image.jpg" );
// change format to png
$im->setImageFormat( "png" );
// output the image to the browser as a png
header( "Content-Type: image/png" );
echo $im;
// or you could output the image to a file:
//$im->writeImage( "image.png" );
?>
|