System.Drawing 命名空间
请参考MSDN:http://msdn.microsoft.com/zh-cn/library/xs6ftd89
Graphics 类
Graphics 类提供将对象绘制到显示设备的方法。 Graphics 与特定的设备上下文关联。
Graphics object by calling the Control.CreateGraphics method on an object that inherits from System.Windows.Forms.Control, or by handling a control's Control.Paint event and accessing the Graphics property of the System.Windows.Forms.PaintEventArgs class.">通过调用继承自 System.Windows.Forms.Control 的对象上的 Control.CreateGraphics 方法,或通过处理控件的 Control.Paint 事件并访问 System.Windows.Forms.PaintEventArgs 类的 Graphics 属性,可以获取 Graphics 对象。 也可以使用 FromImage 方法从图像创建 Graphics 对象。 有关创建 Graphics 对象的更多信息,请参见如何:创建用于绘制的 Graphics 对象。
可以使用 Graphics 对象绘制许多不同的形状和线条。 有关如何绘制线条和形状的更多信息,请参见针对要绘制的线条或形状的特定 DrawGraphicalElement 方法。 这些方法包括 DrawLine、DrawArc、DrawClosedCurve、DrawPolygon 和 DrawRectangle。 有关如何绘制线条和形状的更多信息,请参见使用钢笔绘制线条和形状和使用画笔填充形状。
还可以分别使用 DrawImage 和 DrawIcon 方法来绘制图像和图标。 要执行颜色数据从屏幕到 Graphics 对象的绘图图面的位块传输,请参见CopyFromScreen。 有关如何使用 Graphics 对象绘制图像的更多信息,请参见使用图像、位图、图标和图元文件。
此外,您可以操作由 Graphics 对象使用的坐标系。 有关坐标系及其操作方法的更多信息,请参见坐标系和坐标变换。
{
// Declares the Graphics object and sets it to the Graphics object
// supplied in the PaintEventArgs.
Graphics g = pe.Graphics;
// Insert code to paint the form here.
}
// Sets g to a graphics object representing the drawing surface of the
// control or form g is a member of.
g = this.CreateGraphics();
Settings\Joe\Pics\myPic.bmp");
Graphics g = Graphics.FromImage(myBitmap);
示例:TARGET.DrawImage(SOURCE, xx, ...)
Bitmap myBitmap = new Bitmap (System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyPictures));
// Creates a Graphics object that represents the drawing surface of Button1.
Graphics g = Button1.CreateGraphics();
g.DrawImage(myBitmap, 1, 1);
请参考MSDN:http://msdn.microsoft.com/zh-cn/library/ac148eb3
Image 类
为源自 Bitmap 和 Metafile 的类提供功能的抽象基类。
请参考MSDN:http://msdn.microsoft.com/zh-cn/library/system.drawing.image
Bitmap 类
封装 GDI+ 位图,此位图由图形图像及其特性的像素数据组成。 Bitmap 是用于处理由像素数据定义的图像的对象。
备注:
位图由图形图像及其特性的像素数据组成。 可使用许多标准格式将位图保存到文件中。 GDI+ 支持下列文件格式:BMP、GIF、EXIF、JPG、PNG 和 TIFF。 有关支持的格式的更多信息,请参见位图类型。
可以使用 Bitmap 构造函数中的一种来从文件、流和其他源创建图像,然后使用 Save 方法将这些图像保存到流或文件系统中。 使用 Graphics 对象的 DrawImage 方法,将图像绘制到屏幕上或内存中。 有关使用图像文件的主题的列表,请参见使用图像、位图、图标和图元文件。
请参考MSDN:http://msdn.microsoft.com/zh-cn/library/system.drawing.bitmap
颜色与图像
1、什么是RGB、CMYK、HSB颜色模型?
2、什么是灰度?
3、什么是单色位图、16色位图、256色位图、24位位图?
4、什么是调色板?
5、什么是Alpha通道?
6、常见图像文件格式有哪些?什么区别?
7、什么是图像分辨率?
8、图像缩放原理是什么?
9、什么是矢量图?
【参考】
图像格式:http://baike.baidu.com/view/13674.htm
位图BMP:http://baike.baidu.com/view/189487.htm
矢量图:http://baike.baidu.com/view/138039.htm
Bitmap:http://en.wikipedia.org/wiki/Bitmap