Image myImage = new Bitmap(300, 200);
Graphics g = Graphics.FromImage(myImage);
g.CopyFromScreen(new Point(Cursor.Position.X - 150, Cursor.Position.Y - 25), new Point(0, 0), new Size(300, 200));
IntPtr dc1 = g.GetHdc();
g.ReleaseHdc(dc1);
this.pictureBox1.Image = myImage;
myImage.Save("c:\\1.jpeg"); 需要更多功能,回复我。
Graphics g = Graphics.FromImage(myImage);
g.CopyFromScreen(new Point(Cursor.Position.X - 150, Cursor.Position.Y - 25), new Point(0, 0), new Size(300, 200));
IntPtr dc1 = g.GetHdc();
g.ReleaseHdc(dc1);
this.pictureBox1.Image = myImage;
myImage.Save("c:\\1.jpeg"); 需要更多功能,回复我。
解决方案 »
- webBrowser下载文件问题
- 动软的 public class PubConstant 如何解决。
- 可以将数据库可以保存在U备里面,然后在远程网页中,使用U盘中数据库吗?
- 如何设置由mdi子窗体弹出的窗体成为mdi父窗体的子窗体
- IrisSkin2.dll使用方法?
- 以前C#程序写好后 客户端电脑我都安装了SQL2000的仅连接 后来发现有的电脑没安装也能正常连接数据库 是不是本来就不用安装呀?
- datagrideview 中用comboxcolumn时进行databind时出错
- WinForm多级分类菜单怎么写!
- 报表程序安装问题。(散分)
- DEV控件中Treelist
- 新手问题马上结帖!求DateGridView更新数据方法。
- 请问各位老大,怎样制作高级搜索页面
[email protected]
[email protected]
using System.Drawing;
using System.Drawing.Imaging;//再经过8句将位图变换成整形数组矩阵。可以最大限度的提高图像处理速度。
比 myBitmap.GetPixel(???)方法快100倍以上速度与C++指针操作不相上下。//获得图像
Rectangle rec = new Rectangle(0, 0, myBitmap.Width, myBitmap.Height);
BitmapData bmpData = myBitmap.LockBitsrec,ImageLockMode.ReadWrite,PixelFormat.Format32bppPArgb); //将图像变换
IntPtr scan0 = bmpData.Scan0;
int len = myBitmap.Width * myBitmap.Height;
int[] pixels = new int[len];
Marshal.Copy(scan0, pixels, 0, len);
myBitmap.UnlockBits(bmpData);
myBitmap.Dispose();DelegateShowLabelstr dc1 = new DelegateShowLabelstr(ShowLabelstr);
DelegateShowLabelstrgz("处理完成", dc1); //回调其他线程
谢谢哦!
学习图形处理
虽然现在用不上
以后可能靠他混饭吃呢 :)
[email protected]
顺便给我来一份学习学习[email protected]
麻烦发一份给我3Q。
谢谢楼主
while (me.IsLiving)
{
me.Up();
Thread.Sleep(1000);
}
me.Dispose();
if (me.HaveChildren)
{
foreach (Person child in me.Children)
{
while (child.IsLiving)
{
child.Up();
Thread.Sleep(1000);
}
}
}
学习...................
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
发给我一个``谢谢``
[email protected]
[email protected]
谢谢楼主
[email protected]
谢谢。
[email protected]
[email protected]
thanks a lot
[email protected]