[求助]各位大哥: 加颜色的这句编译后: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.请问如何修改?谢谢!!急啊