[solved] Wanting to crop to interior of svg image...

Post questions on how to use or achieve an effect in Inkscape.
gohmifune
Posts: 6
Joined: Mon Sep 22, 2008 9:02 pm

[solved] Wanting to crop to interior of svg image...

Postby gohmifune » Mon Oct 06, 2008 9:25 am

Ok, didn't see an answer, and I'm not sure Inkscape is the right too for it, but the problem is that I have an image, basically a series of boxes and some custom made text. I want to important and image, and crop the image so that the boxes and the text are transparent, preferably with the stroke still there until I export it. Is that clear?

I have no clue on how to do this. Is Inkscape even the right too for this? I tried it in gimp, and I can't even edit svg there.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Wanting to crop to interior of svg image...

Postby microUgly » Mon Oct 06, 2008 9:29 am

Is the image a bitmap image? Are you able to show us the image? (You can use any free image hosting site and link to it).

Guest

Re: Wanting to crop to interior of svg image...

Postby Guest » Mon Oct 06, 2008 12:40 pm

The image by deafault is a png at 1920x1280.

ImageImage

Nothing special really, but the plan is to have SVG images, like a logo, some text, and shapes, that I want to cut into this image, and maybe another, so that the space where the logo is will be transparent, and make the image usable for overlapping layers in other programs.

If you know printmaking, then that is what I'm doing, I'm trying to cut out of the bitmap, and prep it for the next stage of the project as a layer.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Wanting to crop to interior of svg image...

Postby microUgly » Mon Oct 06, 2008 1:07 pm

You could use Inkscape, but GIMP is better suited to manipulating raster/bitmap images.

Guest

Re: Wanting to crop to interior of svg image...

Postby Guest » Mon Oct 06, 2008 1:50 pm

That was my first thought, and I tried with GIMP, but it seems that GIMP's SVG support is not so hot. Unless I'm missing something, it can import and export svg, but it can't really manipulate them, but then again, I'm not a GIMP wiz. However, is there no way to just crop the fill space of SVG items out of an image?

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Wanting to crop to interior of svg image...

Postby microUgly » Mon Oct 06, 2008 2:27 pm

Guest wrote:That was my first thought, and I tried with GIMP, but it seems that GIMP's SVG support is not so hot. Unless I'm missing something, it can import and export svg, but it can't really manipulate them, but then again, I'm not a GIMP wiz. However, is there no way to just crop the fill space of SVG items out of an image?

You said the original image is a PNG--where did you get the SVG from? Unless there's some details you haven't told us, I would be opening the PNG in GIMP.

gohmifune
Posts: 6
Joined: Mon Sep 22, 2008 9:02 pm

Re: Wanting to crop to interior of svg image...

Postby gohmifune » Mon Oct 06, 2008 6:41 pm

This is an SVG image of rectangles.

ImageImage


This is the PNG background for my image, a wallpaper/poster.

[img=http://img257.imageshack.us/img257/6457/legionwallpaperbackgrouqu5.th.png][img=http://img257.imageshack.us/images/thpix.gif]

I want to crop the rectangles, INCLUDING, their transparent interior out of the PNG.

I'm afraid I wasn't clear. So my questiong is, can Inkscape do this? I can't figure out how in GIMP, and I'd like to keep all SVG work in Inkscape if possible. I have more complicated shapes on the way which is why I just don't open gimp and use the rectangle highlighting tool. It should be really simple, I would think. SVG stencils cut holes in PNG paper.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Wanting to crop to interior of svg image...

Postby microUgly » Tue Oct 07, 2008 7:29 am

gohmifune wrote:So my questiong is, can Inkscape do this?

Yes, you can. Using clips - http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Clip.html

Take note that clipping objects cut away what is outside of it. If you want to cut a hole in something you need to create a shape with a hole. That will hopefully make sense when you play with it.

gohmifune
Posts: 6
Joined: Mon Sep 22, 2008 9:02 pm

Re: Wanting to crop to interior of svg image...

Postby gohmifune » Tue Oct 07, 2008 4:03 pm

I need to do the opposite. I need to cut out an interior, not an exterior.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Wanting to crop to interior of svg image...

Postby microUgly » Tue Oct 07, 2008 4:17 pm

gohmifune wrote:I need to do the opposite. I need to cut out an interior, not an exterior.

Yah, that's what I tried to explain :) If you want to clip away the interior you need to use a shape with its own interior cut away. You can use "Difference" to create such a shape.

gohmifune
Posts: 6
Joined: Mon Sep 22, 2008 9:02 pm

Re: Wanting to crop to interior of svg image...

Postby gohmifune » Tue Oct 07, 2008 5:35 pm

But doesn't difference only work when it is used between two SVG images. I'm not able to get it to work between an SVG image/series of grouped SVG images and a png image.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Wanting to crop to interior of svg image...

Postby microUgly » Tue Oct 07, 2008 6:26 pm

Image
  1. Pretend the grey box is your PNG
  2. Draw an object that covers your entire PNG
  3. Draw the object that will create the hole in the PNG (in this case a circle)
  4. With the big rectangle and the circle selected, apply a "difference"
  5. Now select the big rectangle with the hole and the PNG and set the clip.

You now have a hole in the PNG :geek:

gohmifune
Posts: 6
Joined: Mon Sep 22, 2008 9:02 pm

Re: Wanting to crop to interior of svg image...

Postby gohmifune » Tue Oct 07, 2008 7:58 pm

Thanks for the diagram. I tried doing that earlier, but I just figured out, that what I was doing wrong was that I had to apply the difference with each path individually, and no en masse or in a group. Is that worth submitting as a feature request, do you think?

I have a problem though, I am able to remove the paths, but not the clones of the paths, I have seven rectangles, six of them are clones, is there a way to get them to be considered paths instead of clones?

Also, I have a Stylized 'O'. It is two paths, then it has a symbol in the center, which is a third path, any idea on how to handle that. I can clip one portion, but not the whole thing.

User avatar
loonquawl
Posts: 135
Joined: Thu May 15, 2008 7:57 pm

Re: Wanting to crop to interior of svg image...

Postby loonquawl » Tue Oct 07, 2008 8:39 pm

On the O thing: you might be able to make them into one path using Path-Combine

On the clone wars: Edit-Clone-Unlink Clones will make a normal path from a clone

gohmifune
Posts: 6
Joined: Mon Sep 22, 2008 9:02 pm

Finally!

Postby gohmifune » Tue Oct 07, 2008 8:54 pm

loonquawl, path-combine wasn't working, but I figured out I had to do exclusion on the two outer paths, and difference on the two inner paths. And thanks for the tip on the unlinking the clones, it works perfectly.

And to micro, thanks so much for all your help. I've finally gotten it to where I need it to be. Thanks so much.


Return to “Help with using Inkscape”