Removing pink color in attached gif image

Posted on 2008-11-08
Last Modified: 2013-12-17
I like to remove (or) make it transparent in the attached gif image via 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)

Question by:itkamaraj
    1 Comment
    LVL 1

    Accepted 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

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now