-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
OpenCV does not respect exif orientation in PNG file #16579
Copy link
Copy link
Closed
Labels
category: imgcodecseffort: few daysExtra design work may required (think about tests too). Or prepare a great tutorial.Extra design work may required (think about tests too). Or prepare a great tutorial.featuregood first issue
Milestone
Description
System information (version)
- OpenCV => 4.2
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
Detailed description
PNG format starts to support EXIF information since 2017, but somehow using IMREAD_COLOR to read a PNG file does not respect the orientation
Attached Capture.png and Capture.jpg are two images both with same EXIF orientation information, try both and you can see the difference.
Steps to reproduce
// C++ code example
cv::Mat cvImgColor = cv::imread("Capture.png", cv::IMREAD_COLOR);
// Expected: cols = 333, rows = 280
// Actual: cols = 280, rows = 333Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category: imgcodecseffort: few daysExtra design work may required (think about tests too). Or prepare a great tutorial.Extra design work may required (think about tests too). Or prepare a great tutorial.featuregood first issue


