当前位置:编程学习 > C#/ASP.NET >>

我在Picture.Box中绘制了一些线段,能不能将picture.box控件中的内容以图片形式保存出来

我在picture.box中绘制了图像的灰度直方图,我想将灰度直方图以图片形式保存下来,不知道哪位高手能教教我怎么做 --------------------编程问答-------------------- Graphics g = pictureBox1.CreateGraphics();          
Bitmap bitMap = Bitmap.FromHbitmap(g.GetHdc());
bitMap.Save(filePath, System.Drawing.Imaging.ImageFormat.Jpeg);
  
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/ --------------------编程问答-------------------- Bitmap bitmap=new Bitmap(picturebox.Width,picturebox.Height);
picturebox.DrawToBitmap(bit,picturebox.Width,picturebox.Height); --------------------编程问答-------------------- 为什么还是出不来效果
补充:.NET技术 ,  .NET Framework
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,