473,382 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Image Rotation

ashsa
45
Hi everyone,

Is there a way to rotate an image to a certain degree using javascript ??
My Idea is to rotate clockwise or anti clockwise an image based on the mouse coordinates..

And to make it cool by changing the image dynamically loaded from a folder..

Many Thanks..
Aug 23 '07 #1
11 4980
dmjpro
2,476 2GB
Hi everyone,

Is there a way to rotate an image to a certain degree using javascript ??
My Idea is to rotate clockwise or anti clockwise an image based on the mouse coordinates..

And to make it cool by changing the image dynamically loaded from a folder..

Many Thanks..
Good Idea.
This is totally mathematical based calculation.
Here it requires more Math knowledge rather than JS knowledge.
Ok.
So post your code experts are here to solve your problem.

Kind regards,
Dmjpro.
Aug 23 '07 #2
ashsa
45
Good Idea.
This is totally mathematical based calculation.
Here it requires more Math knowledge rather than JS knowledge.
Ok.
So post your code experts are here to solve your problem.

Kind regards,
Dmjpro.
I jus started off with the idea and din find a convenient way of doing this .. Googling on this for a long time .. I thought there might be a javascript function that can serve the purpose.. As you said, it indeed requires a lot of Trig n I would love it .. But dont have the basic idea how to rotate the image on a div with z-index set to 1..

Any Idea would be appreciated.. Leaving Office now .. Jus thought not to disappoint you when you dont get further reply from me for today ..
Catch ya tomorro ..
Aug 23 '07 #3
ashsa
45
I jus started off with the idea and din find a convenient way of doing this .. Googling on this for a long time .. I thought there might be a javascript function that can serve the purpose.. As you said, it indeed requires a lot of Trig n I would love it .. But dont have the basic idea how to rotate the image on a div with z-index set to 1..

Any Idea would be appreciated.. Leaving Office now .. Jus thought not to disappoint you when you dont get further reply from me for today ..
Catch ya tomorro ..
Rotation as in Spin (clock wise or anti clockwise)..
Cos when i give rotation, all google results pointed to links for displaying a series of images ( banner rotation )
Aug 24 '07 #4
dmjpro
2,476 2GB
Rotation as in Spin (clock wise or anti clockwise)..
Cos when i give rotation, all google results pointed to links for displaying a series of images ( banner rotation )
Hi Asha.
This is not CHAT ROOM.
I think you all time you do chatting with your friends.
But it's a forum.
Whenever you do some post then please read the guidelines mentioned just at the right end.
OK.

Anyway I am trying to give some hints which may help you to do it.
In Java Script you know how to place a HTML element at absolute or relative position?
I think you know.
So first calculate your mathematical operations means the position of image when you are rotating the image at certain angle.
You know co-ordinate geometry that's here the geometry comes in.
You first try some code then come here, experts are here to solve your problem.

And remember one thing don't use code word here because it's FORUM dear.
Anyway best of luck with your try.

Kind regards,
Dmjpro.
Aug 24 '07 #5
gits
5,390 Expert Mod 4TB
hi ...

i think it might be possible with css ... for IE the following link may be of help ...

kind regards
Aug 24 '07 #6
acoder
16,027 Expert Mod 8TB
Rotation as in Spin (clock wise or anti clockwise)..
Cos when i give rotation, all google results pointed to links for displaying a series of images ( banner rotation )
Try Google search for "javascript rotate image"
Aug 24 '07 #7
dmjpro
2,476 2GB
hi ...

i think it might be possible with css ... for IE the following link may be of help ...

kind regards
Thanks Gits.....Thanks for your suggestion.
But is this possible for all browser?


I think I better to do it with Java Script.
And also your brain will be simply teased.

Anyway thanks again for your suggestion.

Kind regards,
Dmjpro.
Aug 24 '07 #8
gits
5,390 Expert Mod 4TB
as far as i know there is only this possibility with IE-style-filters ... because there is no way to rotate an image physicly with js ... only css may help with that ... and i don't know whether there is any common css for that?

kind regards
Aug 24 '07 #9
dmjpro
2,476 2GB
as far as i know there is only this possibility with IE-style-filters ... because there is no way to rotate an image physicly with js ... only css may help with that ... and i don't know whether there is any common css for that?

kind regards
Ok GITS.
But it would be better if you have a look at the link provided by ACODER.

Kind regards,
Dmjpro.
Aug 24 '07 #10
gits
5,390 Expert Mod 4TB
of course ;) ... please post here again in case you find a solution that works ...

kind regards
Aug 24 '07 #11
gits
5,390 Expert Mod 4TB
mmmhm ... and now after i thought it over it is possible of course ... we may match the mousecoords (probably an inerval of it) with an prepared imagesource and we set the src-attribute accordingly ;) may be i do something like that at the weekend ... would be interesting to try it out ... and have a look at the effect ;)

kind regards
Aug 24 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Deepa | last post by:
Hi All, I'm facing problem displaying image of size 5000X5000 .My window size is smaller than image size so i'm not able to see the complete image.i can use scroll bars to view the image but i...
2
by: Andreas Viklund via DotNetMonster.com | last post by:
Hi! I am developing an application in ASP.NET that takes an image, that have been created with a digital camera or camera phone, and processes it, to get data from it. The image taken by the user...
17
by: santel_helvis | last post by:
Hi All, Could anyone tell me how to rotate the image in javascript. Which concepts I should concentrate to rotate the image
3
by: Mark Szlazak | last post by:
The following page simulates a pool cue and cue ball: http://members.aol.com/myscript/cue.html Mouse cursor position around the cue ball determines where a roll-over of 179 pool cue images is...
5
by: Russell Warren | last post by:
Does anyone have an easier/faster/better way of popping from the middle of a deque than this? class mydeque(deque): def popmiddle(self, pos): self.rotate(-pos) ret = self.popleft()...
5
by: Ricardo Furtado | last post by:
I'm trying, for a week or two, to create a procedure in order to rotate the image in any picturebox control in a cephalometry software. I've found a web site that shows how that can be done:...
9
by: Ohann | last post by:
Hi I have a page with 9 images on, each one placed within a table cell. I want to be able to have a different image displayed each time the page is refreshed as well as being able to have the...
3
by: kimiraikkonen | last post by:
Hi, Here is a very interesting issue, Assume i have picturebox and loaded a image into picturebox, however whenever i want to rotate image using: 'For example 90 degree...
8
by: infoseekar | last post by:
Image Resize & Rotation Hi I have 2 scripts, one for Image rotation and other image resize and they both are working. Image resize scripts load the picture and resize it and Image rotation...
3
by: chvennela | last post by:
Hi, how to make complete rotation any image in html/css <img src=C:\Users\Desktop\DSC00583.JPG" height=300 widht=200 style="image-rotation:90deg;">
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.