Exemplo n.º 1
0
        /// <summary>
        /// Palauttaa kuvan png-muodossa, jossa se voidaan esimerkiksi tallentaa
        /// DataStorage.Export -metodilla.
        /// </summary>
        /// <returns></returns>
        public Stream AsPng()
        {
            DoInitTexture();
            MemoryStream pngStream = new MemoryStream();

            XNATexture.SaveAsPng(pngStream, Width, Height);
            pngStream.Seek(0, SeekOrigin.Begin);
            return(pngStream);
        }
Exemplo n.º 2
0
 public void SaveAsPng(Stream stream, int width, int height)
 {
     XNATexture.SaveAsPng(stream, width, height);
 }