Skip to content

Extend image I/O API with metadata support #27499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 1, 2025
Prev Previous commit
Next Next commit
Smoke test for cv.imreadWithMetadata in Python.
  • Loading branch information
asmorkalov committed Jul 1, 2025
commit ab6b932be07568ac025c3764610bd0f33383e15b
11 changes: 11 additions & 0 deletions modules/python/test/test_imread.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ def test_imread_to_buffer(self):
cv.imread(path, img)
self.assertEqual(cv.norm(ref, img, cv.NORM_INF), 0.0)

def test_imread_with_meta(self):
path = self.extraTestDataPath + '/highgui/readwrite/testExifOrientation_1.jpg'
img, meta_types, meta_data = cv.imreadWithMetadata(path)
self.assertTrue(meta_types is not None)
self.assertTrue(meta_data is not None)

path = self.extraTestDataPath + '/highgui/readwrite/testExifOrientation_1.png'
img, meta_types, meta_data = cv.imreadWithMetadata(path)
self.assertTrue(meta_types is not None)
self.assertTrue(meta_data is not None)


if __name__ == '__main__':
NewOpenCVTests.bootstrap()
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy