• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 759
  • Last Modified:

Removing pink color in attached gif image

I like to remove (or) make it transparent in the attached gif image via vb.net code

1) i need to find out which pixel has the pink color.
2) and make that pixel as transparent or remove that pixel

If anybody has the experience in this area

I attached the gif image. I need to remove or make it transparent of the pink color (which is around the globe)

Kamaraj Subramanian
Kamaraj Subramanian
1 Solution
The following code does what you have asked for the first frame of you image and has instructions on how to repeat it for all the other frames (your gif is animated). However the code will still not do what you expect it to do because the purple/pink around the globe is not the same everywhere.
(If however you have knowledge of which colors are used you can make them all transparent)
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim myBitmap As New Bitmap("C:\download.gif")
        Dim pixelcolor As System.Drawing.Color = myBitmap.GetPixel(1, 1)
        Dim pixelcolor2 As System.Drawing.Color = System.Drawing.Color.FromArgb(248, 25, 251)
        PictureBox1.Image = myBitmap
        'For animated images loop over all frames using 
        'myBitmap.SelectActiveFrame(System.Drawing.Imaging.FrameDimension.Time, FramIndex)
    End Sub

Open in new window


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now