Handle rotation correctly for images taken with front camera