是否可以從存儲器(byte[]
或stream
或Bitmap
)中加載圖片而不將其保存到磁盤?如何從位圖中將圖像置於圖片框中
這是我使用打開byte[]
陣列爲Bitmap
代碼:
unsafe
{
fixed (byte* ptr = Misc.ConvertFromUInt32Array(image))
{
Bitmap bmp = new Bitmap(200, 64, 800, PixelFormat.Format32bppRgb, new IntPtr(ptr));
bmp.RotateFlip(RotateFlipType.Rotate180FlipX);
bmp.MakeTransparent(Color.Black);
bmp.Save("test.bmp");
}
}
而不是使用Bmp.save()
的,我可以把Bitmap
在圖片框中我的形式?
我只是做了它和它的工作很好,謝謝! – 2009-04-13 10:51:36