Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can I rotate an image?

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


Please Help Members By Posting Answers For Below Questions

Explain what are the different errors in php?

1039


What is the use of stripslashes in php?

1033


Is php 7 backwards compatible?

1070


Explain NULL?

1090


What is the use of isset() in php?

1077


How to open a file in php?

1127


How is it possible to know the number of rows returned in the result set?

1247


Does empty check for null?

1019


What is difference between single quotes and double quotes in php?

956


In php how can you jump in to and out of "php mode"?

1037


What are php expressions?

1156


Why session timeout is important?

1178


Is php closing tag necessary?

1048


Explain me soundex() and metaphone()?

1037


What are php strings?

1034