Remove Background from an Image?

Many image editing programs include an option to remove the background from an image.

The Fill command in Snap! can replace all of the adjacent pixels of one color with pixels of a different color. Is there a strategy that could be used to create a Fill command that could fill adjacent pixels within a given tolerance range (with respect to color) with transparent pixels?

In the costume editor, you can choose Transparent as the fill color. (This is a brilliant UI idea, if I do say so myself, and I don't understand why you can't do it in Photoshop.)

Alas you can't set the Pen color to transparent. (This would be equivalent to the Logo PENERASE command.) It's on my long list of minor annoyances that we don't have PENERASE and PENREVERSE. If I ever succeed at talking Jens into these, you'll be able to say PENREVERSE then FILL.

Yep..

All you have to do is modify a fill routine to check for hue befote filling

Are you wanting a solution of looking for hints to do it yourself?

Have you seen this thread -How to Make Pixels ( = fuzzy equal to certain RGB values) Transparent. yet?

It doesn't fill with transparency, but it does make all the pixels, which have certain RGB values, transparent.

If there's an existing solution, there's no need to reinvent the wheel. If a strategy for doing this hasn't already been posted, it is an interesting problem that could be fun to explore.

I tried using transparent fill in the paint editor, but since the blue background is not an even color, only a few pixels were filled. (If there's a "Tolerance" slider, I overlooked it.)

However, this seems like an interesting problem to work on in Snap!, by creating a procedure to adjust the pixels of a stamped image on the stage.

image

@kinestheticlearning Yes, this gets at the same result that I wanted to achieve - in effect, transforming pixels within a given range of values. (Thanks!)

Yeah, we should add a tolerance feature.