1

I have a line drawing that I turned into a bitmap in Inkscape (with Path > Trace Bitmap). I would like to fill certain areas of the drawing with an image. I tried various options in Path. I also tried to convert both the image and the line drawing to path, but it doesn't work. Clipping and masking is not what I want, because then only the lines themselves are "coloured" with the image.

Is it possible to do what I have in mind? I thought "break apart" was the way to go, but then my drawing turns completely black. Any suggestions are greatly appreciated!

I don't know how to give you something to work with, so here's a line drawing that I did a while ago, that is not the drawing I'm working with now, because it's commissioned work. Suppose I wanted to fill some parts of this cat with the starry night by Van Gogh...

I suppose I could trace the shapes I need manually, but I was just wondering if there was a simpler way.

sphynxcat

3
  • Hi. Welcome to GDSE. Why do you want to do this? What's your goal? Is the original image coloured? Are you trying to colour the image? Can't you do a colour trace? There is no other way to get a bitmap inside a vector other than by using a mask or clipping mask. You may have to manually draw the mask however if the trace is complex. Can you share the image or a part of it?
    – Billy Kerr
    May 3 at 9:29
  • @BillyKerr I tried to be a little more specific with my edits. Thank you for your quick reply! May 3 at 9:39
  • Thanks, that makes it answerable now. I've added an answer.
    – Billy Kerr
    May 3 at 10:29

1 Answer 1

1

When you have made your trace, it's now made of vectors. To get a mask you will need to prepare something separately from the line drawing.

Best idea is to create a duplicate of the trace to work on. Then break apart and delete the pieces that you don't want to be part of the mask.

E.g. the trace (left), the trace broken apart (middle), and on the right I'm deleting the pieces I don't want to be a part of the mask.

enter image description here

Once you have the mask pieces prepared, select them all and do Path > Combine - sometimes Path > Union might be better if you experience any problems here - this will turn everything into a single path/shape which we can now use as a mask.

enter image description here

Now bring the raster image into Inkscape, send to the back of the stack using End. Rescale the image if necessary, and move it under the mask.

Select both the mask and the image, and do Object > Clip > Set

enter image description here

Move the masked image under your traced line drawing, make sure it's at the bottom of the stack. Use snapping to get the positioning accurate.

enter image description here

enter image description here

Note: If instead you want something like just the head to be the mask, after preparing the pieces as shown above and combining, you could draw a shape with the Bézier tool around the head, and do Path > Intersection. This will apply a boolean operation to delete parts of the path that lie outside the area you want. Then you could use that as your mask.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.