Rotate and flip
Phones often save a photo of a document sideways or upside down, and some scans come out mirrored. Rotate left and Flip fix the orientation and leave the rest of the image as it is.
Rotate
In the edit bar, Rotate left turns the image a quarter turn counterclockwise, as in photo galleries. Press it twice for a half turn, or three times for a quarter turn clockwise.
A rotation is an edit: Undo removes it, and Apply makes it permanent. Four rotations bring the image back to where it was, and then there is nothing to apply.
From code, rotate() turns clockwise with 1, and counterclockwise with -1:
pic.rotate(1)
pic.rotate(-1)Flip
Flip mirrors the image left to right, as it is on display, so after a quarter turn it still mirrors left to right on the screen. To mirror an image top to bottom, flip it and rotate it twice.
Flips and rotations that cancel out leave nothing to apply. From code, call flip().
In a read-only viewer
With editable: false, the toolbar has Rotate left and Rotate right buttons. They only turn the image on display: nothing is saved, and the apply event never fires. rotate() does the same from code. A read-only viewer has no Flip.
Ids
In the tools option, Rotate left is 'rotate' and Flip is 'flip'.