-
Notifications
You must be signed in to change notification settings - Fork 653
feat(heif): Read and write of CICP and bit depth 10 and 12 #4880
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
Example file: nas_sole_mates.zip |
8ad4136 to
a93a487
Compare
Signed-off-by: Brecht Van Lommel <[email protected]>
By setting the matrix coefficients, the library will perform RGB to YUV conversion on write. The YUV to RBG conversion was already happening on read automatically. Signed-off-by: Brecht Van Lommel <[email protected]>
lgritz
reviewed
Sep 13, 2025
Signed-off-by: Brecht Van Lommel <[email protected]>
Signed-off-by: Brecht Van Lommel <[email protected]>
lgritz
approved these changes
Sep 14, 2025
Collaborator
lgritz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Is this ready to merge?
Contributor
Author
|
Yes, it's ready. |
40810e2
into
AcademySoftwareFoundation:main
58 of 59 checks passed
zachlewis
pushed a commit
to zachlewis/OpenImageIO
that referenced
this pull request
Sep 16, 2025
…ftwareFoundation#4880) * Read and write 10 and 12 bit images * Read and write CICP This makes it possible to write HDR images that are much smaller than PNGs, in a file format that is supported in all modern web browsers. By setting the matrix coefficients, the library will perform RGB to YUV conversion on write. The YUV to RBG conversion was already happening on read automatically. A future improvement would be a better default choice of matrix coefficients for writing. When no CICP is specified or when CICP is read from PNG, then no conversion to YUV will be performed and compression will not work as well. This is the same behavior as before. When there is support for conversion between CICP and display interop ID, a good default choice for matrix coefficients could be made as part of that. Tests for CICP and 10 bit were added. --------- Signed-off-by: Brecht Van Lommel <[email protected]> Signed-off-by: Zach Lewis <[email protected]>
lgritz
pushed a commit
to lgritz/OpenImageIO
that referenced
this pull request
Sep 16, 2025
…ftwareFoundation#4880) * Read and write 10 and 12 bit images * Read and write CICP This makes it possible to write HDR images that are much smaller than PNGs, in a file format that is supported in all modern web browsers. By setting the matrix coefficients, the library will perform RGB to YUV conversion on write. The YUV to RBG conversion was already happening on read automatically. A future improvement would be a better default choice of matrix coefficients for writing. When no CICP is specified or when CICP is read from PNG, then no conversion to YUV will be performed and compression will not work as well. This is the same behavior as before. When there is support for conversion between CICP and display interop ID, a good default choice for matrix coefficients could be made as part of that. Tests for CICP and 10 bit were added. --------- Signed-off-by: Brecht Van Lommel <[email protected]>
lgritz
pushed a commit
to lgritz/OpenImageIO
that referenced
this pull request
Sep 16, 2025
…ftwareFoundation#4880) * Read and write 10 and 12 bit images * Read and write CICP This makes it possible to write HDR images that are much smaller than PNGs, in a file format that is supported in all modern web browsers. By setting the matrix coefficients, the library will perform RGB to YUV conversion on write. The YUV to RBG conversion was already happening on read automatically. A future improvement would be a better default choice of matrix coefficients for writing. When no CICP is specified or when CICP is read from PNG, then no conversion to YUV will be performed and compression will not work as well. This is the same behavior as before. When there is support for conversion between CICP and display interop ID, a good default choice for matrix coefficients could be made as part of that. Tests for CICP and 10 bit were added. --------- Signed-off-by: Brecht Van Lommel <[email protected]>
lgritz
added a commit
that referenced
this pull request
Sep 16, 2025
PR #4880 checked in some output reference that contained version numbers, which passed in main but failed when backported to 3.1. This repairs it and makes the output suitable for any version that contains the patch. Signed-off-by: Larry Gritz <[email protected]>
lgritz
added a commit
to lgritz/OpenImageIO
that referenced
this pull request
Sep 16, 2025
PR AcademySoftwareFoundation#4880 checked in some output reference that contained version numbers, which passed in main but failed when backported to 3.1. This repairs it and makes the output suitable for any version that contains the patch. Signed-off-by: Larry Gritz <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This makes it possible to write HDR images that are much smaller than PNGs, in a file format that is supported in all modern web browsers.
By setting the matrix coefficients, the library will perform RGB to YUV conversion on write. The YUV to RBG conversion was already happening on read automatically.
A future improvement would be a better default choice of matrix coefficients for writing. When no CICP is specified or when CICP is read from PNG, then no conversion to YUV will be performed and compression will not work as well. This is the same behavior as before. When there is support for conversion between CICP and display interop ID, a good default choice for matrix coefficients could be made as part of that.
Tests
Tests for CICP and 10 bit were added.
Checklist:
need to update the documentation, for example if this is a bug fix that
doesn't change the API.)
(adding new test cases if necessary).
corresponding Python bindings (and if altering ImageBufAlgo functions, also
exposed the new functionality as oiiotool options).
already run clang-format before submitting, I definitely will look at the CI
test that runs clang-format and fix anything that it highlights as being
nonconforming.