1
0
mirror of synced 2024-11-28 01:10:51 +01:00

Adjust decoding rgb8 without direct x tex

This commit is contained in:
KillzXGaming 2019-07-22 16:48:15 -04:00
parent 68a3933362
commit e7256f607a
2 changed files with 5 additions and 1 deletions

Binary file not shown.

View File

@ -443,7 +443,11 @@ namespace Toolbox.Library
private Bitmap DecodeNotDirectXTex(byte[] data, uint Width, uint Height, TEX_FORMAT Format)
{
if (Format == TEX_FORMAT.BC1_UNORM)
if (Format == TEX_FORMAT.R8G8B8A8_UNORM)
return BitmapExtension.GetBitmap(data, (int)Width, (int)Height);
else if (Format == TEX_FORMAT.R8G8B8A8_UNORM_SRGB)
return BitmapExtension.GetBitmap(data, (int)Width, (int)Height);
else if (Format == TEX_FORMAT.BC1_UNORM)
return DDSCompressor.DecompressBC1(data, (int)Width, (int)Height, false);
else if (Format == TEX_FORMAT.BC1_UNORM_SRGB)
return DDSCompressor.DecompressBC1(data, (int)Width, (int)Height, true);