How to crop pictures

Post questions on how to use or achieve an effect in Inkscape.
VSSHEALY

How to crop pictures

Postby VSSHEALY » Fri Jun 04, 2010 3:26 am

I have a photo that I am working with that has a simple white background. How do I crop out this white background so I'll just be left with the image?

Seems like that would be something simple, but I can't figure it out. Especially since it's the first time using this software. Thanks.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How to crop pictures

Postby brynn » Fri Jun 04, 2010 3:47 am

Inkscape is not the best program to use for this. I would suggest The GIMP or IrfanView.

Unless you need the entire image to be vectored (SVG format). If so, please do the following:
1 - Open Inkscape
2 - File menu > Import
3 - Path menu > Trace Bitmap
There are several settings in the Trace Bitmap dialog, and if you can't figure it out, please refer to one of the links in my signature (I would suggest the tavmjong bah Guide) for instructions. The main thing you need to do, to make sure the background is transparent, is select 'Remove Background'.

However, you may find that Trace Bitmap doesn't render your photo without loss. If it's something like a family photo or landscape, you may be disappointed. If so, please try a raster graphics program, such as the ones I mentioned above.

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

Re: How to crop pictures

Postby prkos » Fri Jun 04, 2010 4:45 am

If you don't mind creating a shape that covers the white background precisely you can use Clipping to hide those areas.

Also don't forget to PixelSnap (extension) the photo before exporting so it doesn't get blurred.
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

VSSHEALY

Re: How to crop pictures

Postby VSSHEALY » Fri Jun 04, 2010 5:56 am

Thanks for the help. I actually figured it out just as the time the first reply was posted. I used the "Remove Background" from the Path menu. It worked, but I just had to recolor the image. Since it was all one color, it wasn't that bad, and worked out for me. Thanks for your help.

fulltlt
Posts: 3
Joined: Tue Aug 17, 2010 6:18 am

Re: How to crop pictures

Postby fulltlt » Thu Aug 26, 2010 1:19 am

VSSHEALY wrote:I have a photo that I am working with that has a simple white background. How do I crop out this white background so I'll just be left with the image?

Seems like that would be something simple, but I can't figure it out. Especially since it's the first time using this software. Thanks.



I have just given up on trying to crop with inkscape. Every time I try to save the cropped image it always has the full original image there so in my case it never has worked. xv is so simple to use to do a simple crop like this that it's just easier to do it with xv and forget about inkscape cropping.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How to crop pictures

Postby brynn » Thu Aug 26, 2010 5:25 am

Well, admittedly I don't know what kind of progam "xv" is, so I don't know what you're comparing Inkscape to. The problem with the original message in this topic, is that we never knew exactly what kind of image needed to be cropped, or exactly what was meant by "cropping". I assumed it was something like a photo, which is why I suggested using the other programs. But as it turned out, it must have been a very simple image, because it sounds like they were able to use Trace Bitmap successfully.

So please feel free to either describe the image your working on, and what you mean by cropping, or you could even upload an example. It may be that you've missed a simple setting, or necessary step in the process. It's always a good idea to include as much detail as possible, when you post a problem in a forum. For goodness sakes (ironic as it seems) text can be so easily misunderstood. The original message here is a perfect example!

Hope to hear more :D

fulltlt
Posts: 3
Joined: Tue Aug 17, 2010 6:18 am

Re: How to crop pictures

Postby fulltlt » Sat Sep 04, 2010 8:06 am

brynn wrote:Well, admittedly I don't know what kind of progam "xv" is, so I don't know what you're comparing Inkscape to. The problem with the original message in this topic, is that we never knew exactly what kind of image needed to be cropped, or exactly what was meant by "cropping". I assumed it was something like a photo, which is why I suggested using the other programs. But as it turned out, it must have been a very simple image, because it sounds like they were able to use Trace Bitmap successfully.

So please feel free to either describe the image your working on, and what you mean by cropping, or you could even upload an example. It may be that you've missed a simple setting, or necessary step in the process. It's always a good idea to include as much detail as possible, when you post a problem in a forum. For goodness sakes (ironic as it seems) text can be so easily misunderstood. The original message here is a perfect example!

Hope to hear more :D



See: http://www.trilon.com/xv/whatisxv.html

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How to crop pictures

Postby brynn » Sun Sep 05, 2010 7:02 am

Oh ok, so xv looks like a raster or bitmap type of graphics program. And yes, cropping a photo, or any simple rectangular shape is a little easier in most raster/bitmap graphics. I don't know why Inkscape does not offer this, but it is a vector graphics program, and therefore works differently. It seems like it would be fairly easy to add to Inkscape but 1) as an open source project, features are often added according to developers' needs rather than other users' needs (because it's all volunteer), and 2) there is always a great deal of discussion and even conflict over how much raster/bitmap features should be included in a vector program.

Here are the steps for "cropping", which in Inkscape is called "clipping". And for future reference, Help menu > Inkscape manual (must have internet connection, or buy the book).

1 - Draw the shape you want for your final image. In other words, either a rectangle of desired dimensions, or copy/duplicate an existing object if it is not a rectangle, or draw it or trace it.
2 - If it is not already, place it over the image you want cropped.
3 - Select original image and newly drawn shape.
4 - Object menu > Clip > Set.
5 - Done!

Technically the original image is there. But you can't see it, and you CAN still edit your image. Technically the image has not been cropped, but instead, the areas that you want cropped off, have been hidden. And indeed, you can Release the clip, and have your original image back. Maybe the issue is why this is a problem for you?

Every time I try to save the cropped image it always has the full original image there...

Are you saying that after you save it, you can still see the original image? How are you doing the save? If you're saving in a bitmap format such as PNG, GIF, JPG, try first saving in the native Inkscape SVG. Then Save as whatever. And also, if you want PNG, do NOT use Cairo png. Instead, use File menu > Export Bitmap. (Yes, I know it's confusing, but there's some future developmental reason for the wording.) This will put a PNG file in the directory you choose.

Or maybe you just don't need a vector graphics program at all? Maybe it would be best for your particular needs, to stick with raster/bitmap programs?

But if you do still need vector, try my suggestions, and let us know how it works. Good luck :D


Return to “Help with using Inkscape”