添加水印图像的图像 [英] adding a watermark image to an image

查看:128
本文介绍了添加水印图像的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要一个小的,那种淡出水印图像添​​加到我的所有图像。

I want to add a small, kind of fading out watermark image to all my images.

有没有办法在C#这样做吗?

is there a way to do this in 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 +资源

Just make sure to dispose all resources used as System.Drawing uses unmanaged GDI+ resources

这篇关于添加水印图像的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆