All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
引入ASP.NET,Web部件连接_[Asp.Net教程]
SQL循序渐进(6)-------删除表_[SQL,Server教程]
大型系统上PHP令人不爽的九大原因_php资料_编程技术
javascript代码混淆综合解决方案_JavaScript技术_编程技术
asp.net得到HTML,meta标记的内容_[Asp.Net教程]
用SQL实现分页的三种方法_[SQL,Server教程]
C#,3.0新特性初步研究,Part6:使用查询表达式_[Asp.Net教程]
ASP.NET基于角色的窗体安全认证机制_[Asp.Net教程]
详细介绍用PHP来编写网页记数器_[PHP教程]
初学者接触HTML了解一些HTML标记(2)_[Html教程]
Reading number is top 10 pictures
Discharge accidentally Actresses by the breast2
Fat bird to fly
The world first motorcycle will be auctioned for 21000 pounds
到南昌西站了3
So beauty, will let you spray blood7
NeedWallpaper13
2012 national geographic daily picture7
Thrilling English baby
The money of more than 100 countries and regions8
看如何给单纯的少女洗脑
Download software ranking
I'm come from Beijing2
Dance with duck(male prostitution)
Boxer vs Yellow4
Unix video tutorial14
功夫熊猫2(下集)
matrix2
Boxer vs Yellow2
DreamWeaver8
Twenty piece of palm leaf
Tram sex maniac 2 (H) rar bag19
归海一刀 published in(发表于) 2014/1/30 1:21:51 Edit(编辑)
asp.net把输入文字转化成图片_[Asp.Net教程]

asp.net把输入文字转化成图片_[Asp.Net教程]

asp.net把输入文字转化成图片_[Asp.Net教程]


using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;

public class Drawing
{
public void CreateImage(string name,string filePath)
{
int wid=300;
int high=200;
Font font=new Font("Arial",48,FontStyle.Bold);
//字的颜色
SolidBrush brush=new SolidBrush(Color.Black);

Bitmap image=new Bitmap(wid,high);
Graphics g=Graphics.FromImage(image);
g.Clear(ColorTranslator.FromHtml("#f0f0f0"));
RectangleF rect=new RectangleF(5,2,wid,high);
//绘制图片
g.DrawString(name,font,brush,rect);
//保存
image.Save(filePath,ImageFormat.Jpeg);
//释放对象
g.Dispose();
image.Dispose();
}
}
public class Program
{
public static void Main()
{
Drawing dh=new Drawing();
Console.WriteLine("输入文字:");
string name=Console.ReadLine();
dh.CreateImage(name,@"e:\test\c#\advanced\Name.jpg");
}
}




添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.