Exemplo n.º 1
0
        public static async Task ConvertToDds(string path, int qMin, int qMax, bool delSrc = false)
        {
            long   bytesSrc = new FileInfo(path).Length;
            string outPath  = Path.ChangeExtension(path, null) + ".dds";

            switch (await Config.GetInt("ddsEnc"))
            {
            case 0: await ConvertToDdsNative(path); break;

            case 1: await DdsInterface.NvCompress(path, outPath); break;

            case 2: await DdsInterface.Texconv(path); break;

            case 3: await DdsInterface.Crunch(path, qMin, qMax); break;
            }

            PostProcessing(path, outPath, bytesSrc, delSrc);
        }