Orient
Rotates the image before resizing and cropping.
How to use
The orient transformation allows you to rotate the image before any resizing or cropping operations are applied.
Pass the following query param to the API endpoint:
orient=angle
Where:
angle
is the rotation angle in degrees.
For example: orient=90
Parameter
angle
: The angle of rotation. This parameter accepts the following values:
- 0: No rotation (default)
- 90: Rotate 90 degrees clockwise
- 180: Rotate 180 degrees
- 270: Rotate 90 degrees counterclockwise
Effect of Orient Transformation
- Rotates the image by the specified angle before any other transformations are applied.
- Useful for correcting image orientation or creating specific layouts.
- Can change the aspect ratio of the image, which may affect subsequent resizing or cropping operations.
This transformation is particularly useful when you need to adjust the orientation of images before applying other transformations.
Original Image
URL : https://www.thunderimage.com/sample/yosemite.jpg
Image Rotated 90 Degrees
URL: /transform?url=https://www.thunderimage.com/sample/yosemite.jpg&orient=90
Image Rotated 180 Degrees
URL: /transform?url=https://www.thunderimage.com/sample/yosemite.jpg&orient=180
Best Practices
- Use orient when you need to correct the orientation of images before applying other transformations.
- Remember that rotating by 90 or 270 degrees will swap the width and height of the image, which may affect subsequent resizing operations.
- When using orient in combination with other transformations, consider the order of operations and how rotation might impact the final result.
- If you’re working with images that may have EXIF orientation data, consider whether you need to use orient or if the image should be automatically rotated based on its EXIF data.
Note
The orient transformation is applied before any resizing or cropping operations. If you need to rotate the image after other transformations, consider using the rotate
transformation instead.
Authorizations
API key required for authentication
Query Parameters
The URL of the image to be transformed.
The angle of rotation to be applied to the image before resizing and cropping.
0
, 90
, 180
, 270
Response
The transformed image in JPEG format.