Skip to content
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

Is HDR Image Encoding Supported? #7

Open
dandyweng opened this issue Dec 22, 2024 · 3 comments
Open

Is HDR Image Encoding Supported? #7

dandyweng opened this issue Dec 22, 2024 · 3 comments

Comments

@dandyweng
Copy link

I tried encoding a HDR image with the Rec. ITU-R BT.2100 PQ color profile, but after encoding, the image is no longer HDR. The README mentions HDR support but doesn’t explicitly say it’s for encoding or decoding. Does this library fully support HDR encoding?

print("before: \(image.isHighDynamicRange)") // true
let data = try JXLCoder.encode(image: image)
let newImage = try JXLCoder.decode(data: data)
print("after: \(newImage.isHighDynamicRange)") // false
@awxkee
Copy link
Owner

awxkee commented Dec 22, 2024

Only decoding is supported. ICC profiles and HDR images not supported in encoding

@dandyweng
Copy link
Author

Only decoding is supported. ICC profiles and HDR images not supported in encoding

Any plans to support it in the future?

@awxkee
Copy link
Owner

awxkee commented Dec 22, 2024

To retrieve pixel data in iOS/macos we have to redraw image on the other surface, at this stage image are being drawing ‘as is’ and metadata is lost. I don’t know how to avoid this. If you know something PR are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants