C# 向图像中添加水印图像
我想在我的所有图像中添加一个小的、淡出的水印图像C# 向图像中添加水印图像,c#,image,watermark,C#,Image,Watermark,我想在我的所有图像中添加一个小的、淡出的水印图像 有没有办法在c#中实现这一点?您可以使用系统来合成图像。绘图 //1. create a bitmap (create a empty one or from file) Bitmap bmpPic = new Bitmap(imgWidth,imgHeight); //2. pass that bitmap into Graphics using (Graphics g = Graphics.FromImage(bmpPic)) {
有没有办法在c#中实现这一点?您可以使用
系统来合成图像。绘图
//1. create a bitmap (create a empty one or from file)
Bitmap bmpPic = new Bitmap(imgWidth,imgHeight);
//2. pass that bitmap into Graphics
using (Graphics g = Graphics.FromImage(bmpPic))
{
//manipulate the image
}
//3. save the bitmap back to a filestream
bmpPic.Save(imgFileStream,ImageFormat.Png);
只需确保处置所有用作系统的资源。绘图使用非托管GDI+资源可以通过ASP.NET以及通过命令(从Windows窗体、控制台或ASP.NET应用程序)动态应用水印。