Inverting an image that's already traced as a Bitmap

Post questions on how to use or achieve an effect in Inkscape.
djcamera
Posts: 5
Joined: Sun May 12, 2019 9:43 pm

Inverting an image that's already traced as a Bitmap

Postby djcamera » Sun May 12, 2019 10:02 pm

I'm using Inkscape to create a vector graphic for a laser cutting project. I'm hitting a snag.
I'm using this font: Image

See how that white line runs through the letters? I want to make the colored part of the letters a FILL, then make the white line part a STROKE. Because I want to cut out the white line part in thin acrylic, and add it to the project as an inlay.

So I think I have to Invert the image and save the interior of the letters as a separate .svg. Problem is, when I select the letters, and hit "Path/Trace Bitmap", nothing happens. I believe that is because it's already a bitmap.

So how do I isolate the interior of these characters to save as a separate .svg? Can I revert the Bitmap back to its "untraced" state?

Or how else can I do it? Thank you.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Inverting an image that's already traced as a Bitmap

Postby Moini » Sun May 12, 2019 10:56 pm

So, this is a font, i.e. a text you typed?

Then do the following:

Path > Object to path (you can skip this if the text is already a path)

Are you sure you want the white part to be just a cut line, with no area? I'm not sure how one could inlay anything in just a plain cut?

If it's supposed to be a line, the quickest way will be to just draw that line.

If it's suppposed to be an area, you need to use the node tool to remove the outsides of the letters, and to connect the insides.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Inverting an image that's already traced as a Bitmap

Postby Moini » Sun May 12, 2019 10:59 pm

(to save some time, you should only do this once per letter in the alphabet, and duplicate the result for any other occurrances of that letter)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

djcamera
Posts: 5
Joined: Sun May 12, 2019 9:43 pm

Re: Inverting an image that's already traced as a Bitmap

Postby djcamera » Mon May 13, 2019 2:08 am

Moini wrote:Are you sure you want the white part to be just a cut line, with no area? I'm not sure how one could inlay anything in just a plain cut?


My laser cutter handles thin glossy acrylic cuts very nicely, even superfine and small detail. So my plan is this: The font will be on my wood project, with the colored parts cut as a STROKE, meaning they will be clearly outlined. The white part will be a deep ENGRAVE, which leaves a groove. So without resizing anything, I need to cut the white part ONLY out of acrylic. The resulting acrylic pieces will (in my mind) nestle perfectly into the grooves.

But I need to isolate just the white parts, and send THAT vector to the laser cutter.

Selecting and making the colored parts of the letter as a vector is easy. Now if I could only "invert" the selected bits, and assign a color to the white lines...

djcamera
Posts: 5
Joined: Sun May 12, 2019 9:43 pm

Re: Inverting an image that's already traced as a Bitmap

Postby djcamera » Mon May 13, 2019 2:12 am

Moini wrote:So, this is a font, i.e. a text you typed?


And oh: to your other question, and one that might be relevant: No, it's not a text I typed. I used a FONT GENERATOR online, screen-captured the words I want to use, imported the JPG image into Inkscape, and traced the bitmap.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Inverting an image that's already traced as a Bitmap

Postby flamingolady » Mon May 13, 2019 4:27 am

Perhaps I'm not understanding totally, but I seem to do the out of the box fixes from what everyone else does anyway, lol. I'm thinking you could duplicate your text, then do either an inset/outset or dynamic offset to get the white part. Or, basically duplicate twice and make one larger, then path difference/exclude etc, or manually remove the outside nodes. Oh wait, if the color part of the font is just the stroke, then duplicate, make it be no stroke, and change the white 'line' to be a color that you can see. you can enlarge or decrease the size, but now you have two 'fonts', one for the outside (colored part) and one for the inside. Probably several ways to accomplish this, depending on your Inkscape knowledge and desired output.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Inverting an image that's already traced as a Bitmap

Postby tylerdurden » Mon May 13, 2019 6:41 am

Here's one way...
Download the font, install for all users, restart (or start) Inkscape then:

Image

Rinse and repeat...
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

cleversomeday
Posts: 62
Joined: Tue Jan 19, 2010 6:52 am

Re: Inverting an image that's already traced as a Bitmap

Postby cleversomeday » Mon May 13, 2019 9:31 am

The problem here is that there is no white line in this font. There is merely open space that your brain interprets as a line. In order to trace it, you have to give it a boundary. One way to do this is to just block the ends with black rectangles, then use the paint bucket tool to trace the white, which is now bounded. The other option is to find a font the white lines enclosed, like Tron or Ostrich Sans Inline, for example.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Inverting an image that's already traced as a Bitmap

Postby druban » Mon May 13, 2019 10:27 am

@DjCamera: you seem to have a fair degree of proficiency so I'll skip the basic stuff, just ask if you don't understand something. Conversely, if I haven't understood what you're asking, correct me! I believe you are asking for a single line, so some of these other solutions may not be exactly what you want.

The first problem is that you require something that Inkscape users have wanted for a long time that has not been written into the program yet, namely, a Centerline trace function. There are workarounds and external solutions.
The second problem is that Inkscape, like almost all desktop vector drawing programs, does not allow branching in a path, I.e. a node can only be connected to no more than 2 other nodes. Which is to say the letter Y cannot be drawn as a single path. In the word TEST123 for example, the letters T and E cannot be done as single stroked paths, so you will have to come up with a plan for those that lets you engrave them correctly.
The other letters can be converted to a single stroke thusly (using S as an example):

rect5244.png
rect5244.png (45.92 KiB) Viewed 2270 times
Your mind is what you think it is.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Inverting an image that's already traced as a Bitmap

Postby Moini » Mon May 13, 2019 11:19 pm

druban, yes! I didn't think of the Interpolate LPE.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

djcamera
Posts: 5
Joined: Sun May 12, 2019 9:43 pm

Re: Inverting an image that's already traced as a Bitmap

Postby djcamera » Fri May 17, 2019 11:31 pm

tylerdurden wrote:Here's one way...
Download the font, install for all users, restart (or start) Inkscape then:
Rinse and repeat...


Thank you! That was very helpful!

djcamera
Posts: 5
Joined: Sun May 12, 2019 9:43 pm

Re: Inverting an image that's already traced as a Bitmap

Postby djcamera » Fri May 17, 2019 11:33 pm

druban wrote:@DjCamera: you seem to have a fair degree of proficiency so I'll skip the basic stuff, just ask if you don't understand something. Conversely, if I haven't understood what you're asking, correct me! I believe you are asking for a single line, so some of these other solutions may not be exactly what you want.

The first problem is that you require something that Inkscape users have wanted for a long time that has not been written into the program yet, namely, a Centerline trace function. There are workarounds and external solutions.
The second problem is that Inkscape, like almost all desktop vector drawing programs, does not allow branching in a path, I.e. a node can only be connected to no more than 2 other nodes. Which is to say the letter Y cannot be drawn as a single path. In the word TEST123 for example, the letters T and E cannot be done as single stroked paths, so you will have to come up with a plan for those that lets you engrave them correctly.
The other letters can be converted to a single stroke thusly (using S as an example):

rect5244.png


Thank you. Interesting about the 'no branching' thing in Inkscape. Learning more and more about this program every day.


Return to “Help with using Inkscape”