Fix image rotated bug in gallery and camera and viewing recipe