Removing Background color in Paint.net

109,238

Solution 1

I used the Paint Bucket tool.

  • Select the Paint Bucket
  • In the Colors window click More >>
  • Move the Opacity - Alpha slider to the left
  • On the toolbar, set Flood Mode to Global and the Blend Mode (the vial/potion icon) to Overwrite
  • Click on the white area.

Solution 2

Paint.net has a tool Magic Wand that select uni-color part, select with it and pres del. At the end don't forget to save as png. For blur parts you need to clear it zooming the image and use the eraser to remove manually the blurred parts

enter image description here

Solution 3

There are multiple ways to accomplish this, but below are two of the easiest ways. The end results are more or less equivalent, so try both to see which one looks better to you.

  1. Use Color to Alpha plugin from Tanel's Photo and Color Plugins (download).
    Start with the following parameters and experiment from there:

    • Hue = off
    • Saturation = off
    • Brightness = from 255 to 255
    • Tolerance = 128
    • Feather = 0
    • Base Opacity = 0
    • Invert Alpha = on
    • Override Original Alpha = off
  2. Use AlphaSpace plugin (download).
    Start with the following parameters and experiment from there:

    • Transparency Color = White
    • Tolerance = 125

Solution 4

This Paint.NET plugin is created specifically for the problem: Deviation to alpha. I wrote it after struggling with this myself and finding the otherwise excellent plugins in thdoan's answer lacking in this regard.

The plugin calculates deviation from a single RGB color, which in your case should be solid black, and applies that deviation as alpha channel variation to a solid image of the chosen color. As a result you should see your logo perfectly extracted and blended from the white background. It works with color images and other color pairs as well, but obviously the result is much different. If you have existing alpha values in the image, you can blend the alphas together. But I don't think it is the case for this question.


A note on why some plugins and other approaches proposed here don't work: they rely on some sort of threshold to determine which colors to exclude. The result is almost there, but it's not enough when precision is needed. By calculating the deviation exactly and forcing a single-color image, we can easily extract objects.

Share:
109,238

Related videos on Youtube

Greeso
Author by

Greeso

Updated on September 18, 2022

Comments

  • Greeso
    Greeso almost 2 years

    I have a .jpg image of a text logo, it looks similar to the example image here:

    logo example

    I am using paint.net.

    Now, I would like to change the image to .png, then I would like to remove all the white background, and make the image black text on a transparent background.

    I tried the magic select tool to select the white background, and I also tried the magic select tool with the shift key pressed to select all the white by color, I tried adjusting the tolerance; but I always am ending up with either very thin white border around the black text, or if I adjust tolerance, some of the black taken away making the text skewed.

    I think the problem is there are some pixels that are not pure black or pure white right around the text. Those are fading from black to white. They should fade from black to transparent.

    How can I remove the white background and only end up with the black text?

    Thanks.

  • Greeso
    Greeso almost 9 years
    This works to some extent, but eats up some of the "letters", so the words become thinner :(
  • Greeso
    Greeso almost 9 years
    Not a good solution. This is what I tried at first. The "blurry" area should not be arazed, but rather be fading into transparent instead of white.
  • emirjonb
    emirjonb almost 9 years
    There is no ideal one click solution. You have to do it manually in one form or another. See the Photoshop tutorials on youtube and try to mimic them on pain.net
  • Glen Blanchard
    Glen Blanchard almost 8 years
    This is exactly what I wanted, it manages to remove some of the antialiasing background blending which is perfect
  • Kirill Osenkov
    Kirill Osenkov almost 8 years
    Works like a charm, just adjust the tolerance to what you need (5-10% usually).
  • OverTheRainbow
    OverTheRainbow about 7 years
    In 4.0.16, there's no Overwrite option when double-clicking the layer and opening the Blending > Mode list.
  • A N
    A N about 5 years
    This worked great for me. I was even able to keep the "blurry" area just by adjusting the Tolerance.
  • Felix
    Felix over 3 years
    I had problems using those plugins, so I've created one myself (forum post) with no parameters to fiddle with. It is intended only for grayscale images though, but works flawlessly for my use case.
  • Arthur Tacca
    Arthur Tacca about 3 years
    @Felix I suggest posting that as a full answer
  • DannyB
    DannyB almost 3 years
    @Felix - your plugin is great! It should not only be answer, but the accepted one. Converting to transparent, together with its anti aliasing. Well done.
  • Felix
    Felix almost 3 years
    @DannyB Thanks a bunch! I posted it here for visibility. It could drown behind other answers, since this one has already some upvotes and other similar plugins.
  • Ričardas Sabaliauskas
    Ričardas Sabaliauskas almost 3 years
    @Felix can you please submit an edit? Sorry I don't have paint.net on current computer.
  • ZygD
    ZygD almost 3 years
    Now it only depends on reviewers. superuser.com/review/suggested-edits/1070886
  • ZygD
    ZygD almost 3 years
    Post it as an answer or try again. All depends on reviewers. Maybe you'll get others :) However, from the first glance, it does a bit seem like a drastic edit.
  • Felix
    Felix almost 3 years
    Posted as an answer now!
  • Felix
    Felix almost 3 years
    This doesn't quite work all the way. For a precise tool, see my answer containing a simple Paint.NET plugin for the job!
  • Greeso
    Greeso almost 3 years
    Very interesting, I will give it a try
  • Felix
    Felix almost 3 years
    @Greeso Let me know how it goes!