AmaroK86.ImageFormat.DDSImage.readBlockImage C# (CSharp) Method

readBlockImage() private method

private readBlockImage ( byte imgData, int w, int h ) : Bitmap
imgData byte
w int
h int
return System.Drawing.Bitmap
        private Bitmap readBlockImage(byte[] imgData, int w, int h)
        {
            switch (header.ddspf.dwFourCC)
            {
                case FOURCC_DXT1:
                    ddsFormat = DDSFormat.DXT1;
                    return UncompressDXT1(imgData, w, h);
                case FOURCC_DXT5:
                    ddsFormat = DDSFormat.DXT5;
                    return UncompressDXT5(imgData, w, h);
                default: break;
            }
            throw new Exception("invalid texture format");
        }