public partial class WebForm4 : System.Web.UI.Page
{
// 原始图片路径
private string path;
private System.Drawing.Bitmap bitmap;
private System.Drawing.Graphics graphics;
string Message = "<script>alert(/"{0}/");</script>";
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
this.txtPicPath.Text = Server.MapPath("/test.jpg");
}
path = this.txtPicPath.Text.Trim();
if (!System.IO.File.Exists(path))
{
MessageShow("指定的源文件不存在!");
return;
}
}
// 打水印Logo
protected void btnLogo_Click(object sender, EventArgs e)
{
string log = txtLog.Text.Trim();
if (log.Length < 1)
{
MessageShow("请输入水印字符!");
return;
}
bitmap = new Bitmap(path);
新闻热点
疑难解答
图片精选