jxl-coder-swift
jxl-coder-swift copied to clipboard
Is HDR Image Encoding Supported?
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
Only decoding is supported. ICC profiles and HDR images not supported in encoding
Only decoding is supported. ICC profiles and HDR images not supported in encoding
Any plans to support it in the future?
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.