मैं एक वेब पेज के भीतर प्रदर्शित करने के लिए एक .aspx पृष्ठ से एक पारदर्शी जीआईएफ वापस करने की कोशिश कर रहा हूं। मैं छवि को पारदर्शिता प्राप्त करने की कोशिश कर रहा हूं, लेकिन मैं सिर्फ ब्लैक होने जा रहा हूं जहां छवि पारदर्शी होनी चाहिए।आप सिस्टम का उपयोग कर पारदर्शी छवि कैसे आकर्षित करते हैं। ड्रॉइंग?
किसी को भी मैं गलत क्या कर रहा पता है?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Me.Load
'' Change the response headers to output a GIF image.
Response.Clear()
Response.ContentType = "image/gif"
Dim width = 110
Dim height = width
'' Create a new 32-bit bitmap image
Dim b = New Bitmap(width, height)
'' Create Grahpics object for drawing
Dim g = Graphics.FromImage(b)
Dim rect = New Rectangle(0, 0, width - 1, height - 1)
'' Fill in with Transparent
Dim tbrush = New System.Drawing.SolidBrush(Color.Transparent)
g.FillRectangle(tbrush, rect)
'' Draw Circle Border
Dim bPen = Pens.Red
g.DrawPie(bPen, rect, 0, 365)
'' Fill in Circle
Dim cbrush = New SolidBrush(Color.LightBlue)
g.FillPie(cbrush, rect, 0, 365)
'' Clean up
g.Flush()
g.Dispose()
'' Make Transparent
b.MakeTransparent()
b.Save(Response.OutputStream, Imaging.ImageFormat.Gif)
Response.Flush()
Response.End()
End Sub
मैंने अपनी पोस्ट हटा दी है, इसलिए यह इसे अव्यवस्थित नहीं करता है। – mattlant