Found that using a MemoryStream to decode a DXT5 dds with 0 mipmaps results in dds.Data[] of all 0's due to:
for (int imageIndex = 0; imageIndex < Header.MipMapCount && pixelsLeft > 0; imageIndex++)
in Pfim.CompressedDds.InMemoryDecode.
Work around:
In Pfim.CompressedDds.DataDecode comment out:
if (stream is MemoryStream s && s.TryGetBuffer(out var arr)) {
return InMemoryDecode(arr.Array, (int)s.Position);
}
Not sure if Pfim.CompressedDds.Decompress, which also calls InMemoryDecode, still works.
Found that using a MemoryStream to decode a DXT5 dds with 0 mipmaps results in dds.Data[] of all 0's due to:
for (int imageIndex = 0; imageIndex < Header.MipMapCount && pixelsLeft > 0; imageIndex++)
in Pfim.CompressedDds.InMemoryDecode.Work around: In Pfim.CompressedDds.DataDecode comment out:
Not sure if Pfim.CompressedDds.Decompress, which also calls InMemoryDecode, still works.