DJ Mike's Tutorials: PHP

Imagemagick Functions


^

Imagick::getImageFormat

Description:
string Imagick::getImageFormat ( void )

Returns the format of a particular image in a sequence.
Return Values
Returns a string containing the image format on success.
Errors/Exceptions
Throws ImagickException on failure.

Example


<?php
$image 
= new Imagick("logo.png");
$image->trimimage(10);
header"Content-Type: image/$image->getImageFormat()"  );
echo 
$image;
?>



^

Created by DJ Mike from Santa Barbara

DJ Mike


Dance Away Santa Barbara's Home Page
<a href="http://www.statcounter.com/" target="_blank"> <img src="http://c5.statcounter.com/counter.php?sc_project=1321035&java=0&security=da2193dc" alt="counter free hit invisible" border="0" /></a>