Image bmap;
IDataObject data = System.Windows.Forms.Clipboard.GetDataObject();
bmap = (Image)(data.GetData(typeof(System.Drawing.Bitmap)));
Graphics g = Graphics.FromImage(bmap);
SolidBrush drawBrush = new SolidBrush(Color.Red);
Font drawFont = new Font("Arial", 10, FontStyle.Bold, GraphicsUnit.Millimeter);
int xPos = bmap.Height - ( bmap.Height-25 );
int yPos = 3;
g.DrawString ("zydzydyzydydydyyydydy", drawFont, drawBrush, xPos, yPos);
string sPicPath = "d:\\filename.jpg";
string sPreFix = "d:\\xxx";
Image smBmap ;
smBmap = bmap.GetThumbnailImage(bmap.Width, bmap.Height, null, System.IntPtr.Zero);
smBmap.Save(sPicPath, System.Drawing.Imaging.ImageFormat.Jpeg);
bmap.Save(sPreFix + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
bmap = null;
smBmap = null;
IDataObject data = System.Windows.Forms.Clipboard.GetDataObject();
bmap = (Image)(data.GetData(typeof(System.Drawing.Bitmap)));
Graphics g = Graphics.FromImage(bmap);
SolidBrush drawBrush = new SolidBrush(Color.Red);
Font drawFont = new Font("Arial", 10, FontStyle.Bold, GraphicsUnit.Millimeter);
int xPos = bmap.Height - ( bmap.Height-25 );
int yPos = 3;
g.DrawString ("zydzydyzydydydyyydydy", drawFont, drawBrush, xPos, yPos);
string sPicPath = "d:\\filename.jpg";
string sPreFix = "d:\\xxx";
Image smBmap ;
smBmap = bmap.GetThumbnailImage(bmap.Width, bmap.Height, null, System.IntPtr.Zero);
smBmap.Save(sPicPath, System.Drawing.Imaging.ImageFormat.Jpeg);
bmap.Save(sPreFix + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
bmap = null;
smBmap = null;
来源:https://www.cnblogs.com/leonardleonard/archive/2007/03/24/1927986.html