Beispiel #1
0
        public void Compile()
        {
            ParsedPath pngFileName = Target.InputFiles.Where(f => f.Extension == ".png").First();
            ParsedPath xnbFileName = Target.OutputFiles.Where(f => f.Extension == ".xnb").First();

            string           compressionType;
            Texture2DContent textureContent;

            Target.Properties.GetOptionalValue("CompressionType", out compressionType, "None");

            ImageTools.CompressPngToTexture2DContent(pngFileName, compressionType, out textureContent);

            XnbFileWriterV5.WriteFile(textureContent, xnbFileName);
        }