Rotating an image in all browsers (canvas in IE?)

18,489

RaphaelJS is a great cross-browser JavaScript library that might do exactly what you need. I highly recommend it. If you visit the site there is even a specific example that involves rotating an image.

Share:
18,489
Sukhpreet Singh Alang
Author by

Sukhpreet Singh Alang

Updated on June 05, 2022

Comments

  • Sukhpreet Singh Alang
    Sukhpreet Singh Alang almost 2 years

    I finally got to work with canvas only to find out that it is not implemented in IE. I tried explore canvas from google to use it in Internet Explorer, but it's not working for my code (http://uptowar.com/test.php - little bug though that it is not removing the old image when rotating).

    So, is there an other way to smoothly rotate an image around it's bottom center angle? Maybe javascript? Or is there a way to do it with IE and canvas anyway?

    Edit: Google Chrome also seems to add an ugly border to the canvas example.. there must be an other smooth way?

    Edit2: tried a hacky javascript way: it causes mayor lags and corrupts the image (http://uptowar.com/test2.php), anyone knows of a working method?