SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Just a tricky question, may help others too

    How to flip a graphic image horizontally, vertically or at a specified angle. e.g. I have an arrow that points left and I want to use the same image (save download time) at another place that should point to right (horizontal flip) and so on.... Any ideas....................Please let me know as it might help a lot of people saving download time.

  2. #2
    Phil fillup07's Avatar
    Join Date
    May 2002
    Location
    Jacksonville, FL
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No ASP solution is going to help you saving download time. It's possbile using components like ASPJpeg to rotate an image, but this still requires the end user to download separate images.

    It may be possible to find a JavaScript solution... I am not sure.

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do it in IE using filters:
    http://msdn.microsoft.com/workshop/s...BasicImage.htm

  4. #4
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    How big is the arrow? I can't imagine a small arrow gif being any larger than a few hundred bytes.

  5. #5
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Jim. I saw it...can we use it for the purpose I said earlier.

    Hi Thing! The arrow is just an example. if this thing could be done you could do wonders with one single image and by just rotating it through various angles.....Any ideas!!!

  6. #6
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This will only work in IE:
    Code:
    <html>
    <head>
    
    <style type="text/css">
    .rotate90 {
    	filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
    }
    .rotate180 {
    	filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
    }
    .rotate270 {
    	filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
    }
    </style>
    <title>image flip test</title>
    </head>
    <body>
    <div id="main">
    <img src="http://www.sitepoint.com/forums/images/buttons/quote.gif" />
    <img class="rotate90" src="http://www.sitepoint.com/forums/images/buttons/quote.gif" />
    <img class="rotate180" src="http://www.sitepoint.com/forums/images/buttons/quote.gif" />
    <img class="rotate270" src="http://www.sitepoint.com/forums/images/buttons/quote.gif" />
    </div>
    </body>
    </html>

  7. #7
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you used ASP to flip it, then it would be treated as a different image and you wouldn't have any benefit over creating another image! The CSS is the only real way with the same image, but then your stuck with it only working with IE. I would suggest simply creating the other image

  8. #8
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Jim. We usually work with IE. Other browsers are not popular.

    Thanks dhtmlgod for the comment.......chau

  9. #9
    SitePoint Enthusiast afgmail's Avatar
    Join Date
    Jan 2005
    Location
    Houston, TX
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by shawn32105
    Other browsers are not popular...
    Don't want to start a discussion here but this link shows other browsers are becoming popular.
    Scan completed....
    Brain not found.
    filecabin.com : Notepad2


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •