Exemplo n.º 1
0
        public static List <LUtfNode> TGAMipmaps(string input, MipmapMethod mipm, bool flip)
        {
            var raw   = ReadFile(input, flip);
            var mips  = Crunch.GenerateMipmaps(raw.Data, raw.Width, raw.Height, (CrnglueMipmaps)mipm);
            var nodes = new List <LUtfNode>(mips.Count);

            for (int i = 0; i < mips.Count; i++)
            {
                var n = new LUtfNode {
                    Name = "MIP" + i, Data = TargaRGBA(mips[i].Bytes, mips[i].Width, mips[i].Height)
                };
                nodes.Add(n);
            }
            return(nodes);
        }
Exemplo n.º 2
0
        public static byte[] CreateDDS(string input, DDSFormat format, MipmapMethod mipm, bool slow, bool flip)
        {
            var raw = ReadFile(input, flip);

            return(Crunch.CompressDDS(raw.Data, raw.Width, raw.Height, (CrnglueFormat)format, (CrnglueMipmaps)mipm, slow));
        }