日期:2014-05-17 浏览次数:21109 次
//Bitmap bm = (Bitmap)Image.FromFile(@"Pic/WEB Study.jpg");
//Bitmap bSp = bm.Clone(new System.Drawing.Rectangle(0, 0, 1, 1), bm.PixelFormat);
//bSp.Save(@"MyCutPicturesExport/WEB Study.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
Rectangle rect = row[colIndex];
Bitmap cutBitmap = pic.Clone(rect, pic.PixelFormat);
监视器下的对象数据:
pic.Width 1000 int
pic.Height 634 int
pic.PixelFormat Format24bppRgb System.Drawing.Imaging.PixelFormat
+ rect {X = 0 Y = 0 Width = 20 Height = 20} System.Drawing.Rectangle
using (Bitmap bmp = new Bitmap(width, height, PixelFormat.Format24bppRgb))
{
bmp.SetResolution(imageFrom.HorizontalResolution, imageFrom.VerticalResolution);
using (Graphics g = Graphics.FromImage(bmp))
{
// 用白色清空
g.Clear(Color.White);
&nb