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

Thread panics on EXR containing NAN #2275

Open
gyk opened this issue Jul 1, 2024 · 1 comment
Open

Thread panics on EXR containing NAN #2275

gyk opened this issue Jul 1, 2024 · 1 comment

Comments

@gyk
Copy link

gyk commented Jul 1, 2024

Some EXR files might contain NaNs, e.g., AllHalfValues.exr. Calling to_rgba8 on such images causes a panic:

thread 'main' panicked at image-0.25.1\src\color.rs:435:30:
called `Option::unwrap()` on a `None` value
@fintelia
Copy link
Contributor

fintelia commented Jul 2, 2024

Shorter repro:

let img = Rgba32FImage::from_raw(1, 1, vec![1.0 / 0.]).expect("create nan image");
DynamicImage::ImageRgba32F(img).to_rgba8();

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

No branches or pull requests

2 participants