Image Rotate In PHP
Here I am showing the code that will contentiously rotating and Image.
The first file is:
showImageRotate.php
< html >
< head >
< SCRIPT >
function init() {
setInterval("show();", 2000)
}
var dd = 1;
var cc=1;
var iii;
function show() {
if(dd>360) {
dd=1;
}
iii=document.getElementById("div1");
iii. innerHTML = " < img src= "imageRotate.php?degree=%22+dd+%22" / >";
dd+=10;
}
< / SCRIPT >
< /head >
< body onLoad="init(); ">
< table width="200" border="0" >
< tr >
< td > < /td >
< td > < /td >
< td >< div id="div1" style="height:300px; width:500px">< /div >< /td >
< /tr >
< /table >
< / body >
< / html >
And here is the second file:
imageRotate.php
< ? php
// ImageRotate.php
$filename = 'a1.jpg';
$degrees =$_GET['degree'];
header('Content-type: image/jpeg');
$source = imagecreatefromjpeg($filename);
$white=imagecolorexact($source,255,255,255);
imagecolortransparent($source,$white);
$rotate = imagerotate($source, $degrees,$white);
imagejpeg($rotate);
? >
Find interesting stuff in Java, PHP and Dot Net.
Stop writing good code; Start writing Innovative code.
This site is from FUTURE. Science is powerful, but it cannot explain everything.
This site is for smart Primates & ROBOTS only (oh and A L I E N S).
Pages
- Home
- Send problem from my FaceBook Page
- Your FB bio/friends
- Auto Resume Broken File Uploader
- Screen Recorder
- Facebook App
- Screencast with Audio Capture
- Web Page Screen Capture As Image
- Add Watermark In Video
- Unique Code
- PDF Merger
- Unique Software
- Latest Posts
- Arbitrary Text in PDF
- MY ANDROID APP
- Torch in Android
No comments:
Post a Comment