Rotate bits before resizing.
This is the only way my brain can handle the "logical" rotations.