image icon indicating copy to clipboard operation
image copied to clipboard

Restore raw access to RGBE pixel data from HDR images.

Open george-steel opened this issue 8 months ago • 1 comments

HdrDecoder::read_image_transform was used in versions 0.24 and prior to decode and access raw RGBE8 pixels of radiance HDR images.

In version 0.25 this function was made private, with no other no functionality provided to access the raw RGBE pixel data, only the results of converting to f32 RGB. This breaks the rgbe crate, which is used to load and save RGBE textures and to convert hdr to hdrpng with no way of updating it to the current version.

Please make HdrDecoder::read_image_transform and its supporting struct Rgbe8Pixel public again to restore this use case.

george-steel avatar Apr 08 '25 00:04 george-steel

Re-exposing a way to access the raw RGBE8 data seems reasonable to me. However, I think it would be better to have the method (perhaps named something like read_raw_rgbe8?) directly return a byte slice since that's how the rest of the codec logic operates, rather than having a Rgbe8Pixel struct taking a closure to transform pixels.

fintelia avatar Apr 08 '25 00:04 fintelia