public string CreateImage()
{
string str="兴中公司财务章";
Bitmap image=new Bitmap(300,300);
Graphics g=Graphics.FromImage(image);
string thefullname = Server.MapPath("")+"\\";
thefullname=thefullname+"nowtime.png";
Response.Write(thefullname);
Pen p = new Pen(Brushes.Red, 10);
Pen p1 = new Pen(Brushes.Red, 5);
SolidBrush b = new SolidBrush(Color.Red);
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
Point point1 = new Point(150, 50);
Point point2 = new Point(50, 150);
Point point3 = new Point(230, 150);
Point[] curvePoints =
{
point1,
point2,
point3,
};
g.FillPolygon(b, curvePoints, System.Drawing.Drawing2D.FillMode.Winding);
g.DrawEllipse(p, 10, 10, 280, 280);
g.DrawString(str, new Font("微软雅黑", 40, FontStyle.Bold), new
SolidBrush(Color.FromArgb(255, 255, 0, 0)), 40, 200);
g.DrawLine(p1, 80, 240, 220, 240);
g.DrawLine(p1, 80, 250, 220, 250);
image.MakeTransparent(Color.Transparent);
image.Save(thefullname, System.Drawing.Imaging.ImageFormat.Png);
return "/nowtime.png";
}
{
string str="兴中公司财务章";
Bitmap image=new Bitmap(300,300);
Graphics g=Graphics.FromImage(image);
string thefullname = Server.MapPath("")+"\\";
thefullname=thefullname+"nowtime.png";
Response.Write(thefullname);
Pen p = new Pen(Brushes.Red, 10);
Pen p1 = new Pen(Brushes.Red, 5);
SolidBrush b = new SolidBrush(Color.Red);
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
Point point1 = new Point(150, 50);
Point point2 = new Point(50, 150);
Point point3 = new Point(230, 150);
Point[] curvePoints =
{
point1,
point2,
point3,
};
g.FillPolygon(b, curvePoints, System.Drawing.Drawing2D.FillMode.Winding);
g.DrawEllipse(p, 10, 10, 280, 280);
g.DrawString(str, new Font("微软雅黑", 40, FontStyle.Bold), new
SolidBrush(Color.FromArgb(255, 255, 0, 0)), 40, 200);
g.DrawLine(p1, 80, 240, 220, 240);
g.DrawLine(p1, 80, 250, 220, 250);
image.MakeTransparent(Color.Transparent);
image.Save(thefullname, System.Drawing.Imaging.ImageFormat.Png);
return "/nowtime.png";
}