-
Notifications
You must be signed in to change notification settings - Fork 629
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
Reminder: Simplify HDR Decoder #1480
Comments
There seems to be a very minimal HDR encoder, which is not used anywhere yet. There seems to be no comment about whether it could work. Maybe the only barrier preventing it from being used was the missing f32 support back then? Now that f32 support is here, is it a matter of enabling the encoder, or will it have to be actually implemented? |
The approach for the decoder would be simply to change the default color type to |
Yes, please, do that. All my votes for that! I just stumbled about that issue. My project is hdr/exr import, image = "0.24.1"
Workaround for me was to invoke the Hdr decoder directly and call decoder.read_image_hdr(), while passing the other formats to decode() Again, please remove the bad wrapper code that breaks the good code. |
I've opened #1599 for this, but got stuck |
Btw, the solution @emble mentioned would look like this (if anyone's searching for it): let mut r = BufReader::new(File::open(file_name).unwrap());
let decoder = image::codecs::hdr::HdrDecoder::new(r).unwrap();
let pixels = decoder.read_image_hdr().unwrap(); |
F32 color support was further improved, allowing us to hopefully simplify the HDR decoder.
See #1478 and maybe #1473
Draft
The HDR decoder currently uses an adapter to simulate f32 storage. This issue is a reminder to consider removing the adapter in favor of a simple RGB32F buffer.
The text was updated successfully, but these errors were encountered: