如何将图像从位图图片框中 [英] How to put image in a picture box from Bitmap
本文介绍了如何将图像从位图图片框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能不把它保存在HDD
Is it possible to load a picture from memory(byte[] or stream or Bitmap) without saving it to the HDD
这是code我用它来打开byte []数组成位图
This is the code I use to turn the byte[] array into 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(),可我把位图在图片框的窗体上?
Instead of using "Bmp.save()" ,can I put the Bitmap in the picture box on my form?
推荐答案
您是否尝试过这个?
pictureBox.Image = bmp;
这篇关于如何将图像从位图图片框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文