-
I'm making a tool that runs a shader and writes it out to an exr file, but both nvidia flip (flip-evaluator, crashes silently) and imageio (zero frames in the image) fail to load my images. tev (image viewer) does work however. could this be a bug? am I doing anything wrong? my code: let data = slice.get_mapped_range();
let mut image = Rgba32FImage::from_raw(
config.width,
config.height,
data.chunks_exact(4)
.map(|x| f32::from_ne_bytes([x[0], x[1], x[2], x[3]]))
.collect(),
)
.expect("Failed to make image");
// save the image to our output path
if extension == "exr" {
// save full range f32 image
image
.save_with_format(
output.join(format!("{name}.{extension}")),
image::ImageFormat::OpenExr,
)
.expect("Failed to save image");
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
Yeah, gimp also seems to open my images fine. Looks like for imageio I needed to download the extra things, thanks! |
Beta Was this translation helpful? Give feedback.
imageio
docs says it needs a plugin: https://imageio.readthedocs.io/en/v2.8.0/format_exr-fi.html For nvidia I'm completely unfamiliar, however I can add Gimp to the suite of tools that handle exr-images produced by the encoder correctly. There could also be an issue with data validation. I'm not certain how tools react to NaN values being encoded so this might have happened by accident? A minimal reproduction would be nice to discuss this in-depth.