hi everybody


how use javascript to rotate image? Any exemple please!

Hi Silva,

You do not need javascript for that, you can do this purely with CSS, for example to rotate 180 degrees create the following class that you can apply to the image.

.rotateimg180 {
  -webkit-transform:rotate(180deg);
  -moz-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  -o-transform: rotate(180deg);
  transform: rotate(180deg);
}

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Silva,

You do not need javascript for that, you can do this purely with CSS, for example to rotate 180 degrees create the following class that you can apply to the image.

.rotateimg180 {
  -webkit-transform:rotate(180deg);
  -moz-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  -o-transform: rotate(180deg);
  transform: rotate(180deg);
}

Regards,

Daniel

Daniel thanks for the reply.
But I expressed myself badly. Sorry.

I need to rotate the image 90º by clicking a button. Then save this image as it rotates.


Hi,

What type of application are you developing,  Traditional Web, Reactive Web or Mobile?

For doing it in the browser with javascript have a look at:http://jsfiddle.net/6ZsCz/803/ which users the HTML canvas element to achieve the rotation.

For traditional web, you could also consider to do the rotation at the server using the following Forge components: 

Regards,

Daniel