I have a PNG file that is composed of only two colors: white and dark. Majority of image space is occupied by the white color but I want to remove this white color, thus giving the image a transparent background. I am using Paint.NET and manually erasing just results in an awkward untidy picture. Here comes the image:
Example image

Can I do it in paint.NET? Or is there a let's say programmatic way (e.g. using MATLAB) to do it easily?

  • 1
    In Photoshop, there's a simple tool called "Background eraser tool" to remove uniform backgrounds like those, by just adjusting the color tolerance of the eraser and then clicking in the background. Not very familiar with Paint.NET, but last time I checked it had a lot of Photoshop-like tools and plugins, maybe there's one with a similar name you can download in order to do that easily.
    – Ryakna
    Oct 30, 2014 at 9:36

1 Answer 1


The Magic wand is your friend. I could supply you with a completed PNG but I'd rather show you how to do it

enter image description here

Things of note? Use the contiguous not global setting. Play with the tolerances - I went with 70 percent to knock some of the antialising off. I picked a larger area to work on but you can/should just zoom in when working. Having a black background layer is a nice way to check if your cropping is fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.