我想在我的所有图像中添加一个小的淡出水印图像。
有没有办法在 c# 中做到这一点?
您可以使用System.Drawing
//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);
只需确保处置所有用作 System.Drawing 使用非托管 GDI+ 资源的资源
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)