3 ms·
One of the common image processing libraries does take into account EXIF rotation: OpenCV [1] I would tend to use that over manually rotating using the code fro
by quietbritishjim 7y ago
One of the common image processing libraries does take into account EXIF rotation: OpenCV [1] I would tend to use that over manually rotating using the code from the article. Although beware that OpenCV cannot open quite as many formats as Pillow, most notably it cannot open GIFs due to patent issues. You can get a prebuilt wheel of OpenCV by pip installing the package opencv-python [2]
[1] https://docs.opencv.org/trunk/d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56 https://docs.opencv.org/trunk/d4/da8/group__imgcodecs.html#g...
[2] https://pypi.org/project/opencv-python/ https://pypi.org/project/opencv-python/