Jump to content

Magic Wand issue


Recommended Posts

I'm a casual, but longtime user. I don't know why I waited this long to try to get an answer for this, but anyway...whenever I select something using the magic wand, it always comes with a little extra around the entire selection. It's almost like a narrow beach around an island. It's quite often white, and when I paste this into another image, i always have to use the eraser tool to remove this very noticeable "ring" around the selection. It is very time consuming. Am I doing it wrong? Is there an option to prevent this? Is there a way to avoid this problem? Is thee an easier way to remove this "beach"? Thanks for any guidance you can provide.

Edited by vinny_the_hack
Link to comment
Share on other sites

My bad. I didn't mean the selection tool. I meant the magic wand. I just used it to select the white background of an image, then inverted the selection (to pick up what I want), and then copied it and pasted it into a black image (for contrast). Notice all the white around the image that got picked up from the background from the original image.

 

test1.jpg

Edited by vinny_the_hack
Link to comment
Share on other sites

The ring around the image is composed of pixels which are not the background color. Most likely they are intermediate colors to assist with anti-aliasing.

 

The technique you're using will often result in these artifacts.

 

Best solution? Paste the graphic into a transparent layer and run AA's Assistant on the layer. AA's Assistant can be found in this plugin pack..

 

 

Link to comment
Share on other sites

The other option I often use to remove solid black or white backgrounds is AlphaSpace. You can simply run this plugin over the unedited source image.

 

 

Link to comment
Share on other sites

I have confirmed that the "ring" around the object is indeed picked up from the background of the original image. I tested this by colouring it red before performing the same test I did above and here's the result.test2.jpg It's a little difficult to see in this one, but there are red pixels around the entire image.

 

I installed the plugins, but I'm at a loss as to how to use AA's Assistant. I tried various values and I saw no effect whatsoever on the image. Could you please list step-by-step what I should do? Thanks for your help.

Edited by vinny_the_hack
Link to comment
Share on other sites

I just used 'AA's Assistant' on its default values, and it worked fine.

worker.png

 

0) Start with large resolution --> https://s3-ap-southeast-1.amazonaws.com/cdn1.zepo.in/upload/product_photos/base/0/33/93/original1.2186538.1.jpg

1) Use the Magic Wand to select the region(s) you wish to remove

2) Delete the selection

3) Run the 'AA's Assistant' plugin.

Link to comment
Share on other sites

Just to clarify: AA's Assistant works on groups of pixels which border transparent areas. It is the opaque/transparent border where the cleaning up actually happens. So, you need to cut the image from the background, deselect the area, then run the plugin on the whole layer.

Link to comment
Share on other sites

I get no discernible effect from running AA's Assistant. I even used your high resolution image to start with. Result is same (white border). Have you verified that you have leftover white pixels bordering the image after removing the white background and before running AA's Assistant? I'm wondering if Paint.Net isn't behaving differently on your machine and mine. Thanks again for your continued help.

Link to comment
Share on other sites

Please post the image so we can confirm what you're explaining.

Link to comment
Share on other sites

3 hours ago, vinny_the_hack said:

Why is there a halo at all? Isn't this a bug? Shouldn't everything up to the black border of the image be removed after selecting and cutting the white background? Just sayin'.

 

In order to make the edge look smooth and not jagged and stair-steppy, the pixels on the edge are a blend of the background and foreground colors. So if you have a white foreground and a black background, the edge pixels are various shades of gray. The problem is the edge pixels are partly background and partly foreground, so if you remove them, you remove some of the foreground, while if you leave them, you leave part of the background.

 

One method is to:

 

Use the Color Picker to set the Primary Color to the background color.

Use the Magic Wand to select the background with a low tolerance so the edge pixels aren't selected.

Add a new layer and make it the active layer.

Fill the selection. (The foreground area of the added layer will be transparent; the background filled with a fixed color.)

Make the new layer invisible. (This isn't necessary, but I think it makes it easier.)

Activate the original layer. (This actually -- and unfortunately, IMHO! -- happens automatically when the new layer is made invisible).

Erase the selection. You should have a foreground area surrounded by a halo.

Activate the added layer.

Apply a Gaussian Blur with a Radius around 5. (The best radius somewhat depends on the image.)

Use the Magic Wand to select the background area of the added layer.

Adjust the Tolerance to move the selection inside the edge. It will move smoothly.

Activate the original layer.

Run the Color Clearer plugin. Click the reset button on Color to Make Transparent to set the color to the current Primary Color. The Color Clearer will "remove" the background color from the edge pixels.

Delete the added layer.

 

Make sure at all times that the correct layer is the active layer. It's easy to have the wrong layer active.

 

EDIT: Modified method.

EDIT: Fixed error in specifying which area of the new layer will be filled with color and which will be transparent.

 

Link to comment
Share on other sites

There is NO tolerance level that will make a clean cut/selection of all the white background. It goes from leaving a halo to selecting the entire image. 

Here's something interesting. I started with a layer of black. I added a second layer and drew a black circle. I dumped a bucket of white at 30% tolerance into the background. I selected the white background at 30% tolerance, and cut it out. There's a halo left around the black circle. Shouldn't paint-canning at 30% tolerance and then removing at 30% tolerance cancel each other out, leaving no white behind? Another interesting thing: I then used AA's Assistant and it removed the halo, unlike my previous experience with the original image. I have an idea for a further experiment. I'll be back with the results soon. And thank-you all for your help.

Link to comment
Share on other sites

Okay, I tried running AA's Assistant again on the original image (after cutting out the background), and after several iterations, the halo disappeared. What I found was that the border around the little man was not fully black, and so it appeared to have a halo around it when I had tried it the first time. I confirmed this by selecting the black colour from the colour chart, and drew a line over it. Don't know if that made sense to anyone, but suffice to say, I'm happy, and thanks to all for your help.

Edited by vinny_the_hack
Link to comment
Share on other sites

5 hours ago, vinny_the_hack said:

What I found was that the border around the little man was not fully black,

 

On 9/12/2016 at 10:19 AM, Ego Eram Reputo said:

The ring around the image is composed of pixels which are not the background color. Most likely they are intermediate colors to assist with anti-aliasing.

;)

 

7 hours ago, vinny_the_hack said:

It's exactly like the one I posted above in my second post.

 

Pwned! :lol:

See what happens when I speed read?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...