标题:[求助]各位大哥: 加颜色的这句编译后:Parameter is not valid.请问如何修改 ...
取消只看楼主
fanbin0810
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-4-12
 问题点数:0 回复次数:2 
[求助]各位大哥: 加颜色的这句编译后:Parameter is not valid.请问如何修改?谢谢!
protected void UpdateBtn_Click(object sender, EventArgs e)
{
String filename1;
filename1=Image1.Src;
System.Drawing.Image image = System.Drawing.Image.FromFile(Server.MapPath(filename1));
System.Drawing.Image newimage = new Bitmap(image.Width, image.Height, PixelFormat.Format32bppRgb);
Graphics g = Graphics.FromImage(newimage);
g.DrawImage(image,0,0,image.Width,image.Height);
Font f = new Font(FontType.SelectedItem.Text, Int32.Parse(FontSize.SelectedItem.Text));
Brush b = new SolidBrush(Color.Red);
g.DrawString(Caption.Text, f, b, 10, 140);
g.Dispose();
System.Drawing.Image suo = Bitmap.FromFile(Server.MapPath(filename1));
suo = suo.GetThumbnailImage(Int32.Parse(Width.Text), Int32.Parse(Height.Text), null, IntPtr.Zero);
image.Dispose();
image.Save(Server.MapPath(filename1), ImageFormat.Jpeg);
Image1.Src=filename1;
Caption.Text="";

}

各位大哥: 加颜色的这句编译后:Parameter is not valid.请问如何修改?谢谢!!急啊
搜索更多相关主题的帖子: Parameter valid not image Drawing 
2006-04-20 08:29
fanbin0810
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-4-12
得分:0 

我也是刚学,不懂啊!

2006-04-20 08:57
fanbin0810
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-4-12
得分:0 
你有在上传图片以后加水印的程序吗?急用啊
2006-04-20 09:00



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-58709-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.970253 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved