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

Which one is best framework for php?

964


How are sessions maintained?

925


Do you know what is the function mysql_pconnect() usefull for?

930


How to write in a file in php?

997


What is the use of Php variables?

1071


What is strlen function in php?

1009


How to find length of an array in php ?

1011


What is == and === in php?

895


in PHP for pdf which library used?

994


What is the actually used php version?

1079


What is isset in php?

965


What is the use of print_r function in php?

923


Explain Type hinting in PHP?

1006


What is composer install?

1049


Tell me will a comparison of an integer 12 and a string "13" work in php?

1059