Monday, March 26, 2012

Text in Image, Question

I know there has to be a real simple solution to this:
<%@dotnet.itags.org. Page Language="c#"%>
<%@dotnet.itags.org. Import Namespace="System.Drawing.Imaging" %>
<%@dotnet.itags.org. Import Namespace="System.Drawing" %>
<%@dotnet.itags.org. Import Namespace="System.Drawing.Drawing2D" %>
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Bitmap bmp= new Bitmap(Server.MapPath(Request.QueryString["i"]));
Graphics g=Graphics.FromImage(bmp);
g.SmoothingMode = SmoothingMode.AntiAlias ;
g.DrawString(Request.QueryString["t"],
new Font("verdana",12),SystemBrushes.WindowText, 1, 1);
Response.ContentType="image/jpeg";
bmp.Save(Response.OutputStream, bmp.RawFormat) ;
}
</script>
I have tried adding in stuff and changing stuff, but I just can't do it!
All I want to do is change the font color to white
Thanks in advanceg.ForeColor = Color.White

0 comments:

Post a Comment