NVlabs / flip

A tool for visualizing and communicating the errors in rendered images.
497 stars 41 forks source link

Fix issues with OpenEXR images with more channels than RGB #31

Closed Latios96 closed 3 months ago

Latios96 commented 3 months ago

This PR fixes issue #30

To me it seems like numRecognizedChannelsand exrHeader.num_channels were confused. Using numRecognizedChannels instead of exrHeader.num_channels seems more appropriate when loading the data, since the OpenEXR image can contain an arbitrary amount of (unused) channels.

I don't know if this is the best fix, but it worked for me.

inversepixel commented 3 months ago

Thanks so much! This is really how the code should have worked... this is the first time I encounter EXR images with more channels, so the code has never really been tested. Anyway, I removed some of the previous warnings and minor cleanup as well. You can see here, if you are interested: https://github.com/NVlabs/flip/commit/de24b9365140aab84e01adfe21e47f1985f016d4

Latios96 commented 3 months ago

Your welcome, great it is fixed and simplified now!