Skip to main content

Rotation

Sometimes as a developer you might want to allow your users to rotate the image if the transformation is not correct. PerceptPixel allows you to rotate the image by 90 deg.

Original Image
example

Syntax

  • a_<type> - Using the Rotation type value for a (angle) sets the angle at which you want to rotate the image. For example, a_90 would rotate the image by 90 deg clockwise. PerceptPixel supports clockwise and anticlockwise rotation of the image.
    • Angle should be in the multiple of 90
    • Angle can be negative as well. For example - a_-90. This would rotate the image by 90 deg anticlockwise.

Clockwise and Anticlockwise rotation

Rotation of the image is determined by the sign of the angle followed by a_ in the transformation.

  • Clockwise - Angle should be positive.
  • Anticlockwise - Angle should be negative.

1. Rotating the image by 90 deg

Clockwise 90 deg rotation
example
https://img.perceptpixel.com/demo-brjexrkh/a_90/example-1.jpeg

2. Rotating the image by -90 deg

AntiClockwise 90 deg rotation
example
https://img.perceptpixel.com/demo-brjexrkh/a_-90/example-1.jpeg