Example #1
0
        public static EditableUtf UncompressedFromFile(IconType type, string iconName, string filename, bool alpha)
        {
            var texNode = new LUtfNode()
            {
                Children = new List <LUtfNode>()
            };

            texNode.Children.Add(new LUtfNode()
            {
                Name = "MIP0", Data = TextureImport.TGANoMipmap(filename, true)
            });
            return(Generate(type, iconName, texNode, alpha));
        }
Example #2
0
        public static EditableUtf CompressedFromFile(IconType type, string iconName, string filename, bool alpha)
        {
            var ddsNode = new LUtfNode()
            {
                Children = new List <LUtfNode>()
            };

            ddsNode.Children.Add(new LUtfNode()
            {
                Name = "MIPS",
                Data = TextureImport.CreateDDS(filename, alpha ? DDSFormat.DXT5 : DDSFormat.DXT1, MipmapMethod.None, true, true)
            });
            return(Generate(type, iconName, ddsNode, alpha));
        }