54

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.

Excellll
  • 12,847
Greeso
  • 641

5 Answers5

89

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.
Paul
  • 1,011
18

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

ebilcari
  • 720
9

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
ADTC
  • 3,044
thdoan
  • 787
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.

Felix
  • 221
1

You should do the inverse approach here. Don't try to remove the anti aliasing material. Instead, simply cut the black part of the text and move it to a transparent layer.

Open the image.
Use the magic wand tool.
Click the black part of the text.
Adjust the tolerance to make sure you only grab the darker pixels.
Cut the selection, leaving a faint gray outline (the part you didn't want anyway).
Use ctrl+n and it will auto create a perfect size for your new image.
Paste your image.
Done.

This process took me 90 seconds with your image. Here it is:

Travis J
  • 198