# Rotate

Rotates the image by a specified angle, counterclockwise. You can use **bg\_color=X** to set the background fill color if the rotation angle is not divisible by 90.

<mark style="color:orange;">**r=X**</mark>

## Examples

| Preview                                                                                            | Syntax                                                                                                                                                                                                                                                                            |
| -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://content.gitbook.com/content/IDIcmPiz7q6Sr6ZHHQxV/blobs/4TKiR3dKtL9VBoeKAnMO/image.png) | [/samples.scaleflex.com/earth.jpg?<mark style="color:orange;">**w=400**</mark>&<mark style="color:orange;">**r=90**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/earth.jpg?w=400\&r=90)                                                                          |
| ![](https://content.gitbook.com/content/IDIcmPiz7q6Sr6ZHHQxV/blobs/quRtF7p4Dc8ERk02P5uc/image.png) | [/samples.scaleflex.com/earth.jpg?<mark style="color:orange;">**w=400**</mark>&<mark style="color:orange;">**r=15**</mark>&<mark style="color:orange;">**bg\_color=10100E**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/earth.jpg?w=400\&r=15\&bg_color=10100E) |

{% hint style="info" %}
Please note that image rotation is performed *before* resizing operations.
{% endhint %}
