/// <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); }
public void SaveAsPng(Stream stream, int width, int height) { XNATexture.SaveAsPng(stream, width, height); }