jxl-coder-swift icon indicating copy to clipboard operation
jxl-coder-swift copied to clipboard

Is HDR Image Encoding Supported?

Open dandyweng opened this issue 10 months ago • 3 comments
trafficstars

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

dandyweng avatar Dec 22 '24 07:12 dandyweng

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

awxkee avatar Dec 22 '24 09:12 awxkee

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

Any plans to support it in the future?

dandyweng avatar Dec 22 '24 15:12 dandyweng

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.

awxkee avatar Dec 22 '24 15:12 awxkee