![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4
![]() |
Image rotation
Hello everybody,
I'm working on a project where we need to rotate an image at 90 degrees. I've got this already written: function rotateMyImage() {
var rotBy = $("rotBy").value;
rotBy = parseInt(rotBy) + 1;
if(rotBy==4) rotBy = 0;
$("rotBy").value = rotBy;
oDiv.style.filter='progid:DXImageTransform.Microsoft.BasicImage(rotation=' + rotBy + ')';
odivinmyImg.style.filter='progid:DXImageTransform.Microsoft.BasicImage(rotation=' + rotBy + ')';
}I've searched on the internet and found out that this code is IE specific. I need something that works at least in IE and Firefox. Can't seem to find anything on the net. Any ideas how to go about this?
__________________
PFO - My daily dose of technology. |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3
![]() |
I don't know much about web programming, but how could a method name with 'Microsoft' be in any way portable? Try this code.
__________________
Robotics @ Maryland AUV Team - Software Lead |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4
![]() |
I've seen this earlier. It's not what I'm looking for. I've to rotate large images and not small icons. And It's written in javascript which is going to be very slow.
__________________
PFO - My daily dose of technology. |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3
![]() |
Well, when in doubt Google. You should use the canvas element on Firefox and Safari, but leave the DirectX functions for IE. See more here: http://cow.neondragon.net/index.php/...ascript?page=6
__________________
Robotics @ Maryland AUV Team - Software Lead |
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4
![]() |
Thanks a lot Game_Ender. It seems the way to go. I'm looking into it now.
__________________
PFO - My daily dose of technology. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Image float, wrap text, oh boy! | DaveQB | HTML / XHTML / CSS | 1 | May 20th, 2006 12:34 AM |
| Image Viewer (Urgent Bèta testing) | SoniX | Visual Basic .NET | 8 | Sep 21st, 2005 5:25 PM |
| Transparent Image? | jorgen_i | C++ | 1 | Mar 7th, 2005 11:58 AM |
| Flash Actionscript - Scrolling an object with set marks. | TerraNerd | Other Scripting Languages | 0 | Feb 22nd, 2005 1:51 AM |
| Checking source codes of image, audio and video files | on_auc | C++ | 3 | Feb 21st, 2005 8:36 PM |