代码如下:
---------------------------------
//加文字水印
System.Drawing.Image image = System.Drawing.Image.FromFile(path);
Graphics g = Graphics.FromImage(image);
g.DrawImage(image, 0, 0, image.Width, image.Height);
Font f = new Font("Verdana", 10);//设置字体大小
Brush b = new SolidBrush(Color.Black);//设置字体颜色
string addText = "99999999";
g.DrawString(addText, f, b, 1, 1);//设置坐标
g.Dispose();//保存加水印过后的图片,删除原始图片
string newPath = Request.PhysicalApplicationPath+Label3.Text+"/g9959w_"+strNewName;
image.Save(newPath);
image.Dispose();
TextBox2.Text=Label3.Text+"/g9959w_"+strNewName;
if(File.Exists(path))
{
File.Delete(path);
}
=====================================
问题是:是的gif格式不能加水印,但是jpg就可以,为什么呀?怎么改代码?