gotcha

Author Topic: Line thickness roadblock  (Read 799 times)

February 23, 2019, 12:31:55 AM
Read 799 times

Amyorr

  • Sr. Newbie

  • Offline
  • **

  • 7
I just have a question about line thickness. Im aware of ‘fill and stroke’ function to make the line thickness wider but it wont allow me to make my lines thinner then the original scan. Is it possible to make lines thinner than the original thickness?

February 23, 2019, 05:42:16 PM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Usually, that's possible, yes. Can you check if your 'line' has a path effect applied to it? Select it, and look into the status bar at the bottom.

February 23, 2019, 06:06:44 PM
Reply #2

phiscribe

  • Jr. Member

  • Offline
  • ***

  • 43
If you draw a line with Inkscape, it is a path, likely an open path.  It has no inherent thickness.  If you give it a thickness, say 2 points, then do Stroke to path, it becomes an object.  This object is a solid shape, with how thick it is defined by its shape, (a closed path.)  This type of thickness is a result of it's shape.  It is very different than how thick it is based on how thick you make the outline or stroke.  It will never be less thick than its shape, unless you change the shape.

That said, I bet your scan and resulting trace bitmap produced a shape, that can't have its thickness less than what it is.  What would be better is a path, (open path) and not a shape, (closed path.)

Doing a centerline trace might give you what you are wishing for.  An extension you can download and add might work.  https://github.com/fablabnbg/inkscape-centerline-trace

If that works, you wind up with paths that have no inherent thickness and you can assign as you wish.  If you gave us a link to the svg file you are working with it might be more telling.
  • Latest Stable
  • Win 8.1

February 23, 2019, 06:42:02 PM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

Yes, I agree.  It would be easier if we could see your SVG file.  If you mean by "thinner than the original scan" that you created the path with Trace Bitmap, then what you thought is a stroked path might not actually be that (as phiscribe tried to explain).  But what it might be could be a few things (based on my understanding of your message).  So it would be easier if we could see the SVG file.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 04, 2019, 10:37:46 AM
Reply #4

Amyorr

  • Sr. Newbie

  • Offline
  • **

  • 7
Hello, so sorry for such a long wait for my response. Im technology illiterate (my 7-year old is better with computers then I am.) and learning to function in the forum website was a little more difficult then I thought it would be. When I replied to all your responses on the conversation thread my post somehow got lost in the submitting. Anyway, thank you all for your replies. I will try to attach a picture sample (SVG file??) of what I'm trying to thin the lines on, hopefully the attachment works. Thank you so much Phisribe for that link on centerline trace, I'm working my way through it slowly, being new to all the inkscape lingo and trying to understand it. The picture I attached, is it a closed or open path?

March 05, 2019, 07:34:18 PM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Aahh ok.  So first, I should explain about the difference between raster graphics and vector graphics.  Or actually I'll give you a link.  This doesn't tell the whole story, but it gives a general idea:  http://goinkscape.com/inkscape-vs-gimp-a-vector-and-raster-comparison/.  GIMP is a raster graphics editor, while Inkscape is a vector graphics editor.

Did you open the file you attached (59.jpg) in Inkscape?  And that's where you can't change the width of the line?  If so, that's because JPG is a raster format.  It's a raster image, and doesn't have any paths.  If you don't have paths, you can't have a stroke, which is what you would make thinner or wider.

Next, I guess it might be a good idea to ask why you want to make the lines thinner.  It depends on what you want to do with the image, as to whether it would be better for you to use Inkscape, or a raster editor (such as GIMP).

If you need to use Inkscape, you'll have to convert that raster image to vector before you can make the lines thinner.  There are 2 ways to do that.  One way is to use the Pen tool, and trace over it.  The other way is to use Path menu > Trace Bitmap, which will automatically trace it.  However, that will trace 2 lines -- the inner edge of the lines that you see, and the outer edge.

As you've written your message, that you want the lines to be thinner, Trace Bitmap would not seem to be the best choice.  It sounds like you need a single path, rather than inner and outer paths.  And that's what phiscribe suggested is the Centerline Trace extension.  It will automatically trace it, and only have a single line as a result.

Personally, I don't like the results of a centerline trace, because it makes things a little bit strange in the area where 2 lines intersect.  You can really only see what I mean by trying it.  Or maybe I'll just quickly do it, to show you what I mean.  It all comes back to what you need this work for, in the end.

Ok, attached is a screenshot (click on it to make it bigger).  On the left is part of the original image.  The double-red lines shows what happens when you use Trace Bitmap.  One red path along the inner edge of the original black line, and one  red path along the outer edges.  On the right is the result of the centerline trace.  It's just the one blue line.  But you can see that the intersections aren't handled faithfully.  And when there are more than 2 lines intersecting, it gets to be a little bit like a knot at the intersections.

So those are the auto-trace options.  Manually tracing with the Pen tool gives a single line, like centerline trace, but you don't get the knot type of effect at the intersections.  So it gives a better result, but it takes longer.

To answer your question about closed or open paths.  If it was vector paths, it probably would be some closed paths and some open paths.    A circle is an example of a closed path - a path which does not have any beginning or end.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 10, 2019, 03:57:58 PM
Reply #6

Amyorr

  • Sr. Newbie

  • Offline
  • **

  • 7

Okay, sorry again for taking so long to reply. Thank you so much brynn for taking time to help me. What I’m doing is creating song visuals for my church. I teach music to children and draw simple pictures for songs we learn. I also want to post them online so others can use them. Each song has several pictures and when i draw them the thickness of my marker changes. When that happens some of my drawings are thin and some are too thick. I wanting the pictures that go to the same song to have the same thickness, thus the needing to thin some lines sometimes. The picture i posted was just an example of one of the visuals.
I have opened the pic file in inkscape and did do trace bitmat. Ive done that to all my drawings just to make the lines smoother but haven’t done anything else with it except trying to thin the line which is where it wouldn’t let me. After trace bitmat (making it a vector) i save the picture into a .png. But after i make it a vector it still wont let me make it thinner.
Since i wont be often to have the need to thin a drawings the manual way might be handy to learn. What are the steps to manually trace a pic and make it thinner?
Thank you so much!

March 10, 2019, 05:08:05 PM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Do you need to make the entire drawing thinner?  Or just in certain places, here and there, within a single image?

Also, please tell us exactly which options you're using in Trace Bitmap.

There are ways to make the lines thinner, but there are a couple of ways, and the best way depends on your answers to those questions.


Also, this is off topic.  But I've been thinking about making some coloring books with Inkscape.  If I ever get far enough with this project, I would want to publish them, and put the profits back into the Inkscape project, as a donation.  I'm not really an artist, and I can't draw freehand designs.  I've just been using Inkscape to make abstract geometric designs (like these:  https://inkscapecommunity.com/ic_gallery/thumbnails.php?album=57 and https://inkscapecommunity.com/ic_gallery/thumbnails.php?album=56 ).  But if I could ever get this going, I'd love to have some nice line drawings that are more artistic and freehand, such as the butterfly image you showed.  Would you be interested to make some drawings for that?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 11, 2019, 02:13:14 PM
Reply #8

Amyorr

  • Sr. Newbie

  • Offline
  • **

  • 7
In some cases I would need to make the whole picture thinner, but it would be beneficial to learn how to just do parts of the picture thinner. I attached the settings of when I do trace bitmap (sorry I misspelled 'bitmap' in my past posts).

About the freehand drawings. That sounds like fun to make drawings for that. If you ever get that going just ask. Since its off topic of inkscape I'll give you my personal email for contact [removed for safety]. I have hundreds of clip art pictures already drawn but most are religious since i make them for church but i can easily make basic non-religious drawings like, animals, nature, etc.

Also I've gone to the link about centerline trace but i still don't understand how to do it. i know you said it makes the connecting lines become a little weird but it might be helpful to know plus if needed i can fix those connecting lines manually after making the lines thinner.
« Last Edit: March 11, 2019, 10:49:11 PM by brynn »

March 12, 2019, 02:18:53 AM
Reply #9

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Ok, here we go.  This will be long.  Some of what you're asking is not always easy to do, and you'll figure that out when you are trying it.  First I want to be sure you understand what's happening with Trace Bitmap.

In your first message, you mentioned being aware of making strokes wider or narrower using Fill and Stroke > Stroke Style tab > Width.  So you know a little bit about paths.  Paths are the most basic element of vector graphics (in my understanding anyway).   Paths alone (as phiscribe was explaining) aren't really visible.  They can exist with a stroke or without a stroke, and the stroke is what you're making thinner or thicker in Fill and Stroke dialog.

The Brightness Cutoff option that you've been using (in Trace Bitmap), as I've explained, gives you an inner path and an outer path.  The paths don't have a stroke, but because the paths are both closed and combined, they have a fill.  And because the paths are so close together, and filled in between, it looks like a line, to us.  But to Inkscape it's not a line, it's a fill.  You can see that by selecting one of your traced images with the Node tool.  Go ahead and try it, so you can see.

When I look at your butterfly image, I see the image has tons and tons of nodes.  Possibly you don't need so many.  And for editing, it's probably better if you don't have so many.  Fortunately, there's an easy way to fix it.  Path menu > Simplify will reduce the number of nodes drastically.

Unfortunately, and it's kind of a long story why, but in your drawings it results in some distortion of the "lines".  Go ahead and try it.  If you use the butterfly drawing that you shared earlier, you'll see what I mean.  It's possible to adjust how many nodes are removed with Simplify, but I'm not sure if that would fix this problem.  Let's see....

Oh, it did help quite a bit.  I still see some distortion.  But that result would be acceptable for me.  But of course it's entirely up to you.  Ok, go to File menu > Inkscape Preferences > Behavior > Simplification Threshold, and change it to 0.0010.  Then Undo the first simplify, and try it again with the new setting.  If that result is ok for you, it will make it much easier to edit the paths.

To edit the paths, with the Node tool, you can grab the nodes and move them around, or you can move the handles around, if you don't want or need to move the node.  Grab that tiny circle on the end of the handle and move it.  Or, if you place the mouse over the path (where there aren't any handles in the way), you can drag the path itself.  So this is the best way to edit just a few areas of a drawing.

If the simplification results are not acceptable, and the distortion it creates is too much for you, you don't have to do it.  As long as you only have one or 2 drawings in a file, the large number of nodes won't cause any problems.  It will be harder to edit the drawing with so many nodes, but you won't have any performance issues.  But if you start putting a lot of these drawings, or more complex drawings in a file, you could start seeing Inkscape going slower and slower.  But for all the info I have at this time, it sounds like simplification is not a requirement, just an option.

Ok, so you can see that node editing can be a very tedious process.  You certainly wouldn't want to edit a whole drawing that way.  If you need to make a whole drawing thinner, the best way to do that is when you make the trace, rather than afterwards with the Node tool.  Notice the Threshold spinbox (where you can change the number value) to the right of Brightness Cutoff option.  You can adjust that and make the result thicker or thinner.  It doesn't give you unlimited ability.  For example, I don't think you could make the line as much as double its width, or half it's width.  Well, maybe half, depending on how wide it is in the first place.  This is the best way to make the whole drawing thinner.

To make the lines of a whole drawing thicker, if you want them thicker than you can get using the Threshold setting, you can add a stroke.  Select the new paths.  Then hold the Shift key, while you click on the black chip in the palette.  If that made it too thick, you can go to Fill and Stroke dialog, which you already know how to do, and adjust it from there.  Remember to have the zoom set for 100%, so you're judging the thickness properly.

Regarding the centerline trace extension, what is it that you don't understand - how to use it or how to install it?  Unfortunately, the author of that extension doesn't seem to know how to write instructions for people who aren't tech-savvy.  But I think I can decipher them.  I'm less sure if I can deciphere how to use the extension.  When I click OK, it seems to work, but everything else is still a mystery.  If it's help installing it that you need, tell me what your operating system is, so I know which section to decipher.

If you're ok with the centerline trace results, that's probably your best option, compared to everything above.

Since you expressed wanting to learn how to do things, I decided to go ahead and tell you all that.  But what I'm really thinking is that your best option will be to recreate your drawings in Inkscape, using traditional path tools, rather than auto-tracing them.  Or in other words, manually trace them.  Although if you like the centerline trace results, that will be faster.  But I still think this would be the best option.  Or you might find that one of these techniques works best for certain drawings or other techniques for others?

To manually trace them, you still import them as with auto-tracing.  You might like to put the imported drawing on its own layer, which you can lock, which prevents you from accidentally moving it.  Sometimes it's hard to get it back in the right place, once it's moved.  Layer menu > Layers, opens the Layers dialog.  Click the plus sign to add a new layer.  In the little dialog that comes up, select Below Current, in the Position dropdown menu.

Import the drawing.  It should import onto the new layer, but if it doesn't, you can move it using Shift + PgUp or PgDn.  When it's in the right layer, click the tiny lock icon, to lock it.  Now you won't be able to select it, so be sure you have it in the right place before you lock it. 

Now enable the layer above it (by clicking on it, in the Layers dialog).  Enable the Pen tool, and you're ready to start drawing.  I think I'll just make a little video for this.  It will be faster than writing it all out. 

I should note that I use the Pen tool a little differently than most people.  In Regular Bezier mode, you can make both corner nodes and smooth nodes, as you draw.  When you click once with the Pen tool, you set a corner/cusp node.  When you click-drag, it makes a smooth node.  Some people can create the nodes, and adjust them perfectly, on the fly, so to speak.  I can't seem to coordinate my hand/finger/mouse to do that.   So instead, I put the Pen tool in Straight Line mode, which only sets corner/cusp nodes, and won't let you create a smooth node, so it only draws staight lines.  Then I come back later and change the nodes, all at once.  I'll try to indicate where these modes are, in the video, I'll point to them with my mouse.



A couple of things in the video that aren't obvious.  The video software puts a little blue circle around my mouse, when I click.  So you can see whenever I click.  You have to double-click with the Pen tool, to end a path, although the video software does not indicate that.  It's hard to see the new paths, because they are black, and only 1 px wide by default.  So you can see what I do, to make then wider, and I made them blue, so you could see them.  To change the color of a stroke, hold the Shift key while you click on a color in the palette. (To change the fill, just click on the color, without any keys.  Although I guess you won't be using the fill, for this.)

So once you have all the paths made, you can select all (Ctrl + a) and change the width in Fill and Stroke dialog, all at once.  Once you become familiar with the Pen, you can finish tracing the butterfly image fairly quickly.  If you have better coordination than me, you might be able to set the smooth nodes on the fly, and go even faster. 

Just in case, I thought I'd mention some little hardware that you can connect up to your computer and Inkscape, called a graphics tablet.  That's a different kind of tablet than iPads.  You can draw on them, with a special pen.  So you could make your drawings directly into Inkscape, and avoid all this tracing!  I  have no idea how expensive they are.  I think relatively reasonable.  (If I had any sketching skills, I would definitely buy one!  But that's just me.)

Regarding the coloring books, I don't see why some religious drawings wouldn't be ok.  Depending on how "big" this project gets, it might be possible to have different themed books.  Some for adults, some for children, and maybe you could even make one for your church.  Although I should say that I have no idea how much this might cost or how much the books would have to sell for, to cover the cost and still have a little donation for Inkscape.  And beyond that, I'll have to figure out how to sell them.

Anyway, I removed your email address from your message, just for safety.  But could you send it to me privately?  Click on the My Messages tab in the main menu, and that will open Private Messages interface.  That way, spammers can't find your email address.  Let me know if you need help with that.

Ok, I think I covered everything.  But be sure and ask if you have any questions.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 12, 2019, 03:25:40 PM
Reply #10

Amyorr

  • Sr. Newbie

  • Offline
  • **

  • 7
Wow, thank you so much. I can tell you took a lot of time and effort to help me with my understanding of this program. Your awesome! With my understanding level it will take me a few days to figure out everything from your message. I'm sure I will have questions.

I will try to send the email to you the way you explained. Thank you for all your help.

March 19, 2019, 07:52:04 AM
Reply #11

Amyorr

  • Sr. Newbie

  • Offline
  • **

  • 7
« Last Edit: March 19, 2019, 09:26:01 AM by brynn »

March 19, 2019, 09:28:45 AM
Reply #12

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Thanks Amy.  I saved the image and then removed it.  I think a lot of those would be great for this kind of project.  It will be a little while before I can focus on the coloring book project, but I'll let you know when I do.  Thanks again!
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann