Draw a bitmap image in asp.net in vb.net

Ranjeet_8
Posted by Ranjeet_8 under VB.NET category on | Points: 40 | Views : 2299
Draw a bitmap image in vb.net.
Add this namespace

Imports System.Drawing
Imports System.Drawing.Imaging

Write this code on ASPX.VB page

Protected Sub Page_Load(sender As Object, e As EventArgs)
Dim bitmapimg As New Bitmap(120, 120, PixelFormat.Format32bppArgb)
Dim grph As Graphics = Graphics.FromImage(bitmapimg)
Dim br As New SolidBrush(Color.Green)
grph.FillEllipse(br, 4, 4, 110, 110)
Response.ContentType = "image/gif"
bitmapimg.Save(Response.OutputStream, ImageFormat.Gif)
bitmapimg.Dispose()
End Sub

Comments or Responses

Login to post response