nickbabcock / Pfim

.NET Standard targa (.tga) and direct draw surface (.dds) image decoder
https://nickbabcock.github.io/Pfim/
MIT License
108 stars 18 forks source link

Loading uncompressed 16bit channel dds causes exception #71

Closed pixtur closed 2 years ago

pixtur commented 3 years ago

We would love to use pfim for loading textures in dds format. Sadly all our assets

are uncompressed R32G32B32A32F files like this one: https://www.dropbox.com/s/xoxldk8mhnrayp1/testBrdf.dds?dl=0

When loading this file with Pfim, we get the following exception:

var image = Pfim.Pfim.FromFile(filename);  //-> "Exception: FourCC: 116 not supported."

Is there any chance support this format could be added to pfim?

nickbabcock commented 3 years ago

Thanks for the bug report! I'm currently working off an open source checklist and just wanted to let you know that I've put this on the list to investigate.

pixtur commented 3 years ago

Awesome. Thank you.

nickbabcock commented 3 years ago

Can you elaborate on what your use case is or what you're expecting from the decoding process? Uncompressed DDS are easy enough to decode, but are you expecting it to be converted to another pixel format like rgba32? If not, I'm somewhat partial to adding a "unsupported" pixel format option to categorize R32G32B32A32F and other similar formats. This would signal has been decoded, but it is up to the user to either convert it into another format or send the image down a pipeline that understands the this (more exotic) format.