110,545
社区成员
发帖
与我相关
我的任务
分享
static void Main(string[] args)
{
MyFun(@"D:\imgs\gsyh_2014-01-01.xls_out.tif", @"D:\imgs\运营业务专用章.png", @"D:\imgs\new.tif");
}
static void MyFun(string oldImgPath,string waterImgPath,string newImgPaht)
{
System.Drawing.Image oldImg = System.Drawing.Image.FromFile(oldImgPath);
System.Drawing.Image waterImg = System.Drawing.Image.FromFile(waterImgPath);
Bitmap bm = new Bitmap(oldImg);
Graphics g = Graphics.FromImage(bm);
g.DrawImage(oldImg, 100, 100, waterImg.Width, waterImg.Height);
oldImg.Save(newImgPaht);
g.Dispose();
oldImg.Dispose();
}