English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

what is the code ? or a code from java or another program I can use .

2006-07-01 19:23:24 · 5 answers · asked by Reza Aghayari 1 in Computers & Internet Programming & Design

5 answers

To rotate an image within HTML, you have two choices which are:
- Dynamic Server Side
- Client Side

If your using Dynamic Server Side programming, there are many languages like PHP/ASP/JSP that have the GD library that will alter the image in anyway you feel like. There are many simple functions within php that will allow you to rotate an image.

A sample code would be this (save it as image.php):

==========================
// File that is same dir as image.php
$filename = 'myimage.jpg';
//Rotation
$degrees = 180;
// Content type
header('Content-type: image/jpeg');
// Load
$source = imagecreatefromjpeg($filename);
// Rotate
$rotate = imagerotate($source, $degrees, 0);
// Output
imagejpeg($rotate);
?>
==========================

rotated image

That will rotate the image by 180 degrees.


Now the second alternative is by using Javascript. This is a pretty difficult task to do if you don't know javascript. So I advise you to use an existing library that does it. This library does the trick!
http://www.walterzorn.com/rotate_img/rotate_img.htm

Good Luck :)

2006-07-02 09:40:11 · answer #1 · answered by ? 6 · 1 0

Degree Html Code

2016-10-31 08:40:30 · answer #2 · answered by ? 4 · 0 0

I would make that modification in some sort of photo software and then put it on the webpage with regular HTML. If you don't have any photo software you can e-mail the picture to me and I will rotate it 180 degrees and send it back to you. If you want it to rotate while the page is being looked at, you would probablyt need some sort of server side program or java script to do it.

texasgpa@yahoo.com

2006-07-02 15:07:29 · answer #3 · answered by Gordon S 5 · 0 0

you can't rotate an image in regular HTML, but you can through PHP in the GD library.

just rotate the image in using your image software, Photoshop PaintshopPro, ECT.


or You can do it with this SCRIPT

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/filter/reference/filters/matrix.asp

note the working example in the last sample code.

2006-07-01 19:27:12 · answer #4 · answered by The Nerd 4 · 0 0

i dun know but u have to take a lot of pictures i presume and have to combine them together.......

2006-07-01 19:26:52 · answer #5 · answered by Khairudin Bin Salim 4 · 0 0

fedest.com, questions and answers