Remove parts of a picture(Make background transparent)

Post questions on how to use or achieve an effect in Inkscape.
mixmstr
Posts: 4
Joined: Thu Dec 11, 2008 6:01 pm

Remove parts of a picture(Make background transparent)

Postby mixmstr » Thu Dec 11, 2008 6:13 pm

Hi , I am new to Inkscape and am really starting to like it. I can't figure out how to remove different part(s) of a picture or make the part(s) transparent. My best example would be a picture of a tire against a background. I know how to use the clip tool to remove the outer section of the tire, but how do you remove the inner part of the tire? I want only the tire to be visible. Any help would be appreciated.

Thank You,
Alex

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Remove parts of a picture(Make background transparent)

Postby prkos » Thu Dec 11, 2008 10:53 pm

I'm guessing that the tire you want to separate is a donut-shaped object, so you need to draw an object that resembles that.

Try drawing a circle, then another circle on top that is smaller, select them both and go to Path > Difference. This function will subtract the smaller circle from the larger one. This is how you get a donut shape, use it as a clipping path on your image.
I guess you can see from this that the circles should be drawn to match the tire shape.

Why are you doing this in Inkscape? Maybe using GIMP would make more sense, you can choose by color there so you might get a nice tire selection if it stands out from the background, you can feather the selection so you don't get sharp edges...
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: Remove parts of a picture(Make background transparent)

Postby Simarilius » Fri Dec 12, 2008 12:01 am

As well as difference you could simply combine the 2 paths. this mkaes the 2 curves subpaths of one curve you can use to clip with.

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: Remove parts of a picture(Make background transparent)

Postby kelan » Fri Dec 12, 2008 1:09 am

mixmstr wrote:I can't figure out how to remove different part(s) of a picture or make the part(s) transparent.

This is such a common question that I wrote a guide all about hiding parts of objects (making holes). Download the SVG (right-click then save as) and open it in Inkscape to play around with it.

Holes Guide

mixmstr
Posts: 4
Joined: Thu Dec 11, 2008 6:01 pm

Re: Remove parts of a picture(Make background transparent)

Postby mixmstr » Fri Dec 12, 2008 10:33 am

Thanks for the replies. This helps out with part of my problems. The other thing would be how to use the bezier tool to select multiple things and then clip them. For instance, say there is a picture of a car that I want to remove the background. I can do this, but how would I be able to select the windows, door handles, wheels, etc. and remove them. That was just an example, but I figure I could use the bezier tool somehow to select multiple objects and then be able to remove them so the background shows through.
Thanks Again,
Alex

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: Remove parts of a picture(Make background transparent)

Postby kelan » Fri Dec 12, 2008 11:13 pm

Sure, you can do that.
  1. Draw shapes that completely cover whatever portions of the pictures you want to hide.
  2. Make these shapes pure black and group them together (select each shape, but not the picture, and press Ctrl+G).
  3. Make another shape that completely covers the entire picture and make it pure white. Move it below the black shapes (with the white shape selected, press PgDn to move it down in the stacking order).
  4. Group the white shape with the black shapes.
  5. The white/black shape group needs to be on top of the picture, covering it.
  6. Select the white/black group and the picture (just drag a selection rectangle over the entire thing, it should select both objects).
  7. From the Object menu, choose Mask->Set.
With a mask, whatever portions are black will be transparent, and whatever portions are white will be opaque.

mixmstr
Posts: 4
Joined: Thu Dec 11, 2008 6:01 pm

Re: Remove parts of a picture(Make background transparent)

Postby mixmstr » Sat Dec 13, 2008 4:17 am

Thanks kelan, that is what I wanting to do. What would be the best way to make it where the selection edges that I removed were not so sharp(jagged)? Thanks again.
Alex

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: Remove parts of a picture(Make background transparent)

Postby Simarilius » Sat Dec 13, 2008 7:50 am

You can blur the shape your masking with before you apply it to get soft edges, but it will make rendering slower.

mixmstr
Posts: 4
Joined: Thu Dec 11, 2008 6:01 pm

Re: Remove parts of a picture(Make background transparent)

Postby mixmstr » Tue Dec 16, 2008 7:26 am

Thank You Simarilius, that helped also. Good to go.


Return to “Help with using Inkscape”