<%@ Page Language="VB" %>
<%@ Import NameSpace="System.Drawing" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim Text_String As String = " Persian Tools" & "برای فرومهای" & " hossein_asp " & "نمونه درخواستی"
Dim Font_Family As String = "tahoma"
Dim Text_Size As Integer = 24
Dim Text_Color As Color = Color.Maroon
Dim Text_Style As FontStyle = FontStyle.Bold
Dim Text_Top As Integer = 250
Dim Text_Left As Integer = 50
Dim BMP As New Bitmap(Server.MapPath("bluehills.jpg"))
Dim Text_Font As New Font(Font_Family, Text_Size, Text_Style, GraphicsUnit.Point)
Dim GRP As Graphics = Graphics.FromImage(BMP)
GRP.TextRenderingHint = Drawing.Text.TextRenderingHint.AntiAlias
GRP.DrawString(Text_String, Text_Font, New SolidBrush(Text_Color), Text_Left, Text_Top)
GRP.Flush()
Response.ContentType = "image/jpeg"
BMP.Save(Response.OutputStream, Imaging.ImageFormat.Jpeg)
End Sub
</script>