public void GetMetadataFromTGAFile()
        {
            var testFile = Path.GetFullPath($"Resources/{testFile1}.tga");

            //var md = TexconvNative.GetMetadataFromTGAFile(testFile);
            //Assert.AreEqual(md, s_tga_md);

            //var bpp = TexconvNative.BitsPerPixel(md.format);
            //Assert.AreEqual((int)bpp, s_tgaBpp);

            var md = Texconv.GetMetadataFromTGAFile(testFile);

            Assert.AreEqual(md, new DDSMetadata(s_tga_md, s_tgaBpp, true));
        }
        public void ConvertAndSaveDdsImage()
        {
            var testFile = Path.GetFullPath($"Resources/{testFile1}.dds");

            Directory.CreateDirectory(Path.GetFullPath("texc"));
            var bytes = File.ReadAllBytes(testFile);

            //var outFile = Path.GetFullPath(Path.Combine("texc", $"q204_columbarium_1080p_1.tga"));
            //var result = TexconvNative.ConvertAndSaveDdsImage(bytes, outFile, TexconvNative.ESaveFileTypes.TGA);

            var outFile2 = Path.GetFullPath(Path.Combine("texc", $"{GetTestFile()}.tga"));

            using var ms = new MemoryStream(bytes);
            ms.Seek(0, SeekOrigin.Begin);
            Assert.IsTrue(Texconv.ConvertFromDdsAndSave(ms, outFile2, TexconvNative.ESaveFileTypes.TGA));

            // verify
            var metadata = new TexconvNative.TexMetadata()
            {
                width      = 796,
                height     = 300,
                depth      = 1,
                arraySize  = 1,
                mipLevels  = 1,
                miscFlags  = 0,
                miscFlags2 = 0,
                format     = DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM,
                dimension  = TEX_DIMENSION.TEX_DIMENSION_TEXTURE2D
            };

            //var md = Texconv.GetMetadataFromTGAFile(outFile);
            //Assert.AreEqual(md, new DDSMetadata(metadata, 32, true));

            var md2 = Texconv.GetMetadataFromTGAFile(outFile2);

            Assert.AreEqual(md2, new DDSMetadata(metadata, 32, true));
        }