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?



How can I rotate an image? ..

Answer / 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

More PHP Interview Questions

What does odbc do in context with php?

0 Answers  


What are the advantages of php mysql?

0 Answers  


What are examples of dependent variables?

0 Answers  


Why is php used for web development?

0 Answers  


How can we submit form without a submit button?

0 Answers  


What does the unlink() function means?

0 Answers  


Does php support overloading?

0 Answers  


How to convert strings to upper or lower cases?

0 Answers  


What is a trait in php?

0 Answers  


Want to know the 10th max salary in salary table

3 Answers  


What are the limitations or drawbacks of PHP ?

4 Answers   iDream,


Tell me is it possible to protect special characters in a query string?

0 Answers  


Categories