***************************** test.asp *****************************

<%

	Function getRND(highN, lowN)
		Dim intVal
		Randomize
		intVal = int((highN-lowN+1)*rnd+lowN)
		getRND = intVal
	End Function

	dblV = getRND(999999,100000)

	Response.Cookies("q") = Cstr(dblV)
	tmp = CreateObject("Scriptlet.Typelib").guid
	tmp = Replace(Replace(tmp,"{",""),"}","")

%>
<%=dblV%>
<hr size="1" color="c0c0c0">
<img src="1.aspx?tmp=<%tmp%>" width="400" height="97">



***************************** 1.aspx *****************************

<% @Page language="C#" Debug="true" %>
<% @ Import Namespace="System.Drawing"%>
<% @ Import Namespace="System.Drawing.Imaging"%>
<% @ Import Namespace="System.Drawing.Drawing2D"%>
<% @ Import Namespace="System.Drawing.Text"%>

<script runat="server">

private void Page_Load(object sender, System.EventArgs e)
{

 int width = 200;
 int height = 200;

 String strV;

 strV = (String)Request["q"];

 String Filename = Server.MapPath("news2.jpg");
 System.Drawing.Image gf = System.Drawing.Image.FromFile(Filename);
 Graphics g = Graphics.FromImage(gf);

 g.SmoothingMode = SmoothingMode.AntiAlias;
 g.TextRenderingHint = TextRenderingHint.AntiAlias;

 g.DrawString(strV, new Font("verdana",35,FontStyle.Bold),Brushes.Orange, new PointF(40,25));

 Response.ContentType = "image/gif";

 gf.Save(Response.OutputStream, ImageFormat.Gif);

 g.Dispose();
 gf.Dispose();
}

</script>



***************************** 그림파일 (news2.jpg) *****************************

+ Recent posts