c# 截取picturebox部分图像

 Bitmap bit = new Bitmap(renderImage.Width, renderImage.Height);
            using (Graphics g = Graphics.FromImage(bit))
            {
                g.DrawImage(pictureBox1.Image, new Rectangle(0, 0, renderImage.Width, renderImage.Height), new Rectangle(0, 0, renderImage.Width, renderImage.Height), GraphicsUnit.Pixel);
                bit.Save(saveBitmapPath + "\\" + frame + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp);
                bit.Dispose();
            }

 

posted @ 2013-08-15 23:18  louiskoo  阅读(7845)  评论(0编辑  收藏  举报