title: opencv imwrite, image get rotated
body: <p>I am using opencv in python (cv2) to do some processing on images with format jpg, png and jpeg, JPG. I am doing a test that write image to disk using "cv2.imwrite" right after reading from "cv2.imread". I found part of the image get rotated, some of them rotate 90d, some rotate 180d. But most image keep the right orientation. I cannot conclude a pattern that causes this rotation. Anyone knows more details? Thanks! </p>