怎么在这基础上加水印的透明度、和文字斜放啊?
/**/
/// <summary>
/// 在图片上增加文字水印
/// </summary>
/// <param name="Path">原服务器图片路径</param>
/// <param name="Path_sy">生成的带文字水印的图片路径</param>
protected void AddWater(string Path, string Path_sy)
{
string addText = "哈哈哈哈哈哈";
System.Drawing.Image image = System.Drawing.Image.FromFile(Path);
System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(image);
g.DrawImage(image, 0, 0, image.Width, image.Height);
System.Drawing.Font f = new System.Drawing.Font("Verdana", 50);
System.Drawing.Brush b = new System.Drawing.SolidBrush(System.Drawing.Color.Gray);
g.DrawString(addText, f, b, 35, 35);
g.Dispose();
image.Save(Path_sy);
image.Dispose();
}
怎么在这段代码的基础上加上文字水印的透明度和文字水印斜放啊?谢谢各位了,请各位帮帮忙咯。
------解决方案--------------------图片处理
------解决方案--------------------System.Drawing.Font f = new System.Drawing.Font("Verdana", 50);
这个里面就应该有字体的斜体样式参数
------解决方案--------------------
string path = Server.MapPath("images/p002.jpg");
string text = "哈哈哈哈哈哈哈";
int alpha = 200;//透明度 0~255
System.Drawing.Image image = System.Drawing.Image.FromFile(path);
Graphics g = Graphics.FromImage(image);
Font f = new&