DJ Mike's Tutorials: PHP

Imagick Functions

^

Imagick::rotateImage

Description:
bool Imagick::rotateImage ( mixed $background , float $degrees )

Rotates an image the specified number of degrees. Empty triangles left over from rotating the image are filled with the background color.
Parameters:
background
String or ImagickPixel object representing the background color.
degrees
The number of degrees to rotate the image
Return Values
Returns TRUE on success.

Example

<?php
$image 
= new Imagick("opossum.jpg"); 
$image->rotateimage("transparent",30);
# make it a gif for transparency
$image->setimageformat("gif");
header("Content-type: image/gif");
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>