microsoft / DirectXTex

DirectXTex texture processing library
https://walbourn.github.io/directxtex/
MIT License
1.74k stars 426 forks source link

texconv: -ignoremips options for reading some invalid DDS files #484

Closed walbourn closed 5 days ago

walbourn commented 1 week ago

Some DDS files have invalid mipcount values for the amount of data provided. While -permissive already handles cases where the mipcount value in the header is "too big" for the size of the texture, this new -ignoremips option allows files that are simply missing data by only reading the top-level mip.

Also added support to texdiag for -permissive and -ignoremips (it already supported -badtails).

walbourn commented 5 days ago

Test coverage in this PR.