nickbabcock / Pfim

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

Array out of bounds Exception when open some DDS Files #31

Closed draconas1 closed 5 years ago

draconas1 commented 5 years ago

I'm making a mod parser for Stellaris, where most of the UI icons are stored as DDS images.

Most parse, but some of them get "Index was outside the bounds of the array" when calling Pfim.Pfim.FromFile

Sample images that have failed to load: https://drive.google.com/open?id=1NRYCqqh1C_vvLgKUHQxzoVXYq6g2CGfc

Apologies, I do not understand DDS files well enough to know what is different and causing it to fail while others load fine.

nickbabcock commented 5 years ago

I'm making a mod parser for Stellaris

Small world. Pfim was created for EU3 😄

32 solves this. I'll merge it soon and release a patch update soon.

draconas1 commented 5 years ago

Excellent thanks. Look forward to the update.

nickbabcock commented 5 years ago

Pfim 0.6.0 has been released with this bugfix, thank you for the report.