Answer Posted / jude jeevanraj.p
Probably not something you will want to do a lot of in
ordinary day PHP use, but if you want to rotate an image
use the well-named imagerotate function.
This takes the image to rotate, the angle of rotation, and
a color to fill the blank space around the rotated image
with.
Here's an example:
<?php
$original = imagecreatefrompng("myimage.png");
$red = imageColorAllocate($original,255,0,0);
imagerotate($original,50,$red);
header("content-type:image/png");
imagepng($rotated);
imagedestroy($original);
imagedestroy($rotated);
?>
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is a namespace in php?
What beforeFilter() is used?
Explain me what is the use of 'print' in php?
Does browser understand php?
Which function is used in php to search a particular value in an array?
How can we display the output directly to the browser?
Explain soundex() and metaphone().
What is the content of /etc directory?
Will php die?
Can we use get instead of post?
Is java is better than php?
What will the ?getdate() function returns in PHP?
What is a php form?
Which methods should be used for sending an email using the variables $to, $subject, and $body?
What does session start do in php?