截取部分图片问题,大哥请进,着急
有一幅大图片显示在picturebox1上,将属性设为StretchImage后,图片按照属性缩小,想在小图片上截取矩形框保存,我用程序截取保存后,保存后的图片仍为原图片的位置,请问题这个问题怎样解决.
就是想在设为StretchImage属性后的图片框上截取想要的图.
Bitmap s_image = new Bitmap(range.Width, range.Height);
Graphics s_graphics = Graphics.FromImage(s_image);
s_graphics.DrawImage(pictureBox1.Image, 0, 0, new RectangleF(range.X, range.Y, range.width,range.heith), GraphicsUnit.Pixel);
s_image.Save(@"f:\8.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);