Mega Code Archive
Bitmap MakeTransparent
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D
public class MakeTransparentBitmap
public Shared Sub Main
Application.Run(New Form1)
End Sub
End class
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
Me.Close()
End Sub
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim bm As Bitmap = new Bitmap("yourfile.jpg")
bm.MakeTransparent(bm.GetPixel(1, 1))
e.Graphics.DrawImage(bm, 0, 0)
End Sub
End Class