Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
asmorkalov merged 9 commits intoopencv:4.xfromvpisarev:image_io_with_metadata
Jul 1, 2025

Conversation

@vpisarev
Copy link
Contributor

@vpisarevvpisarev commentedJun 30, 2025
edited
Loading

Covered with the PR:

  • AVIF encoder can write exif, xmp, icc
  • AVIF decoder can read exif
  • JPEG encoder can write exif
  • JPEG decoder can read exif
  • PNG encoder can write exif
  • PNG decoder can read exif

This PR is a sort of preamble for#27488. I suggest to merge this one first to OpenCV 4.x, then promote this change to OpenCV 5.x and then provide extra API to read and write metadata in 5.x (or maybe 4.x) in a style similar to#27488. Maybe in that PR exif packing/unpacking should be done using a separate external API. That is, metadata reading and writing can/should be done in 2 steps:

  • [1] pack and then [2] embed exif into image at the encoding stage.
  • [1] extract and then [2] unpack exif at the decoding stage.

Pull Request Readiness Checklist

See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

crackwitz reacted with hooray emoji
[tested]* AVIF encoder can write exif, xmp, icc* AVIF decoder can read exif* JPEG encoder can write exif* JPEG decoder can read exif[/tested]* (?) probably PNG, WebP etc. decoders can also read exif, need to check.
2. fixed potential compile errors when opencv is built without avif
@vpisarevvpisarev changed the titleadded metadata muxer/demuxer with the corresponding APIExtend image I/O API with metadata supportJul 1, 2025
…be added later into opencv itself)2. print warning if certain encoders don't support metadata ('yet' or 'at all').3. added sanity check for jpg, png and avif that exif is read properly.
@asmorkalovasmorkalov self-assigned thisJul 1, 2025
@asmorkalovasmorkalov merged commit66e5fce intoopencv:4.xJul 1, 2025
26 of 28 checks passed
@asmorkalovasmorkalov mentioned this pull requestJul 21, 2025
D00E pushed a commit to D00E/opencv that referenced this pull requestSep 19, 2025
Extend image I/O API with metadata supportopencv#27499Covered with the PR:* AVIF encoder can write exif, xmp, icc* AVIF decoder can read exif* JPEG encoder can write exif* JPEG decoder can read exif* PNG encoder can write exif* PNG decoder can read exifThis PR is a sort of preamble foropencv#27488. I suggest to merge this one first to OpenCV 4.x, then promote this change to OpenCV 5.x and then provide extra API to read and write metadata in 5.x (or maybe 4.x) in a style similar toopencv#27488. Maybe in that PR exif packing/unpacking should be done using a separate external API. That is, metadata reading and writing can/should be done in 2 steps: * [1] pack and then [2] embed exif into image at the encoding stage. * [1] extract and then [2] unpack exif at the decoding stage.### Pull Request Readiness ChecklistSee details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request- [x] I agree to contribute to the project under Apache 2 License.- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV- [x] The PR is proposed to the proper branch- [x] There is a reference to the original bug report and related work- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable      Patch to opencv_extra has the same branch name.- [ ] The feature is well documented and sample code can be built with the project CMake
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@asmorkalovasmorkalovasmorkalov approved these changes

Assignees

@asmorkalovasmorkalov

Projects

None yet

Milestone

4.12.0

Development

Successfully merging this pull request may close these issues.

2 participants

@vpisarev@asmorkalov

[8]ページ先頭

©2009-2025 Movatter.jp