惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
量子位
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
Y
Y Combinator Blog
Vercel News
Vercel News
云风的 BLOG
云风的 BLOG
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Stack Overflow Blog
Stack Overflow Blog
大猫的无限游戏
大猫的无限游戏
Microsoft Security Blog
Microsoft Security Blog
B
Blog
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
博客园 - 聂微东
腾讯CDC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks

博客园 - 阮

Database access assembly build program. - 阮 Remoting: Server encountered an internal error. - 阮 昨天忽然发现被加到training团队中了,遂来发一篇。 Avalon 与 3D。 关于QQ的临时消息 Google Search for dot net nuke. 初识 Avalon 通过程序控制Windows传真发送。 VRML Merry Chirstmas. 继续昨天的问题。 What's wrong? 构建安全的 ASP.NET 应用程序。(转) 检测Win Form Datagrid点击cell值的代码,from msdn。 Google search for DNN 终于写完了。 DataGrid不能绑定Field? 试了试Dot Net Nuke还真爽。 取得天气的WEB地址,weather.com 终于,从System.Windows.Forms.Control继承了一下。
利用Brush修改图片,并写入Response一例(网上BBS中贴可变文...
· 2005-03-02 · via 博客园 - 阮

经常溜达BBS的人应该都知道,贴个小金牌,上面写上某某某的文字。

也许这个怎么做的早已不是什么秘密了。

今天贴一个ASP.NET版的实现方式,想想在以前ASP的时候是多么遥远的事情啊,转载请注明出处。

        private void Page_Load(object sender, System.EventArgs e)
        
{
            
string drawString = this.Request["String"];

            Font drawFont 
= new Font("@华文行楷", 16f);

            SolidBrush drawBrush 
= new SolidBrush(Color.White);

            
float x = 20f;
            
float y = 20f;

            StringFormat drawFormat 
= new StringFormat();

            drawFormat.FormatFlags 
= StringFormatFlags.DirectionVertical;

            Bitmap bitmap 
= (Bitmap) Bitmap.FromFile("F:\\Golf.jpg");

            Graphics graphics 
= Graphics.FromImage(bitmap);

            graphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat);

            
this.Response.ContentType = "image/JPEG";

            bitmap.Save(
this.Response.OutputStream, ImageFormat.Jpeg);
        }

效果图: