Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 11th, 2007, 11:37 PM   #1
InfoGeek
Professional Programmer
 
InfoGeek's Avatar
 
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4 InfoGeek is on a distinguished road
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.
InfoGeek is offline   Reply With Quote
Old Apr 12th, 2007, 1:16 AM   #2
Game_Ender
Professional Programmer
 
Game_Ender's Avatar
 
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3 Game_Ender is on a distinguished road
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
Game_Ender is offline   Reply With Quote
Old Apr 12th, 2007, 1:42 AM   #3
InfoGeek
Professional Programmer
 
InfoGeek's Avatar
 
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4 InfoGeek is on a distinguished road
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.
InfoGeek is offline   Reply With Quote
Old Apr 12th, 2007, 12:09 PM   #4
Game_Ender
Professional Programmer
 
Game_Ender's Avatar
 
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3 Game_Ender is on a distinguished road
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
Game_Ender is offline   Reply With Quote
Old Apr 12th, 2007, 11:03 PM   #5
InfoGeek
Professional Programmer
 
InfoGeek's Avatar
 
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4 InfoGeek is on a distinguished road
Thanks a lot Game_Ender. It seems the way to go. I'm looking into it now.
__________________
PFO - My daily dose of technology.
InfoGeek is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:24 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC