怎么实现用pictureBox控件保存其中的图片

解决方案 »

  1.   

     //1  如果你的PictureBox是GDI+绘制的 或则 你想要PictureBox现实的效果
                Bitmap _NewBitmap = new Bitmap(_PictureBox.Width, _PictureBox.Height);
                PictureBox1.DrawToBitmap(_NewBitmap, new Rectangle(0, 0, _NewBitmap.Width, _NewBitmap.Height));
                _NewBitmap.Save(@"C:\1.jpg",ImageFormat.Jpeg);            //2  直接保存
                PictureBox1.Image.Save(@"C:\1.jpg", ImageFormat.Jpeg);
      

  2.   


    #region “图片另存为”按钮
    if (sfdSaveImage.ShowDialog() == DialogResult.OK)
    {
         if (pcbProRule.Image != null)
         {
             pcbProRule.Image.Save(sfdSaveImage.FileName + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
         }
    }
    #endregion
      

  3.   

       Bitmap _NewBitmap = new Bitmap(_PictureBox.Width, _PictureBox.Height); 
                PictureBox1.DrawToBitmap(_NewBitmap, new Rectangle(0, 0, _NewBitmap.Width, _NewBitmap.Height)); 
                _NewBitmap.Save(@"C:\1.jpg",ImageFormat.Jpeg); 
    强大
      

  4.   

    region “图片另存为”按钮
    if (sfdSaveImage.ShowDialog() == DialogResult.OK)
    {
         if (pcbProRule.Image != null)
         {
             pcbProRule.Image.Save(sfdSaveImage.FileName + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
         }
    }
    #endregion
      

  5.   

    Image.Save(string path,System.Drawing.Imaging.ImageFormat format)