Isolating part of a raster image
A common task when manipulating photos is isolating a particular element of the image by removing the background along its edges. Inkscape can serve this need well and provides a lot of functionality for achieving pixel perfect results, as we will see in this recipe.
How to do it...
The following steps will demonstrate how to isolate parts of a raster image:
1. Import (Ctrl + I) the
Flower.png
image accompanying this chapter, and choose to embed it.2. Snap it to the pixel grid using the PixelSnap extension by going to Extensions | Modify Path | PixelSnap....
3. Select the Pen (Bezier) tool (Shift + F6 or B) and create a closed path that traces around the flower.
4. Set the path fill to Lime (#00FF00), remove the stroke, and decrease opacity to 30% so you can see the photo below the path.
5. Select the Node tool (F2 or N) and adjust the path so its edges cover the flower edges exactly.
6. Select both the photo and the path and clip them by going to Object | Clip...