Bitmap bmp = new Bitmap();
.. Draw sth on bmp
MemoryStream ms = new MemoryStream();
bmp.Save(ms, bmp.Length);
ms.Position = 0; // 这步是不可缺的,否则异常
Texture texture = TextureLoad.FromStream(ms, ms.Length);
Bitmap bmp = new Bitmap();
.. Draw sth on bmp
MemoryStream ms = new MemoryStream();
bmp.Save(ms, bmp.Length);
ms.Position = 0; // 这步是不可缺的,否则异常
Texture texture = TextureLoad.FromStream(ms, ms.Length);