Inkscape.org
Beginners' Questions How to outline a JPG picture
  1. #1
    Al Smith Al Smith @AplusGems

    Hi All,

    I am very new to Inkscape, but have looked at many tutorials and could not find anything that would work for me.  I am trying to automatically put a tight outline around a picture (see attached photo.)   Because of slightly compromised fine motor skills, it is difficult to do it manually.  Hopefully this can be done with Inkscape.

    Windows 10

    Inkscape Ver. 1.0.1

    Thanks in advance for your help,

    Al

    Amy Rnig Top C
  2. #2
    inklinea inklinea @inklinea⛰️

    When you say manually, you mean automatically frame the subject in the image. 

    The ring in this case is surrounded by a large blank background area, which appears to have been scrubbed at with an eraser tool in another program ? 

    I don't know how the image came to you, however I know from experience after injuring my right hand - holding the mouse button and dragging an eraser tool around the screen is not fun.

    If you are using Windows I would highly recommend enabling 'mousekeys'. Once activated, this can be turned on and off using Shift+Numlock key combination.

    It uses the numeric key pad and allows you to press '0' to switch on drag, and '.' to release drag ( drop ). That means you can move the mouse without having to hold the left mouse button at the same time.

    Also '5' is click and '+' is double click.

    From what you are saying you want to crop the image to fit the subject and then add a nice border ? 

    This can be done in Inkscape using the clip tool, however I would recommend GIMP ( which is free and works alongside Inkscape ) to do this. 

    The reason being, gimp has a crop tool, which if you just hover the mouse over one of the sides, it allows you to use the arrow keys to frame the subject one side at a time.

    Once cropped it is easy to add a simple border of your colour choice using Filters>Decor>Add border

    This can be done in Inkscape, but it would require use of several tools to be able to independently move the side of a clipping object.

     

    Amy Rnig Top C  Cropped Border
  3. #3
    Ellen Wasbø Ellen Wasbø @EllenWasbo

    I do not know if this is what you needed, but what.I did was quite easy in Inkscape. I used trace bitmap with brightness cutoff adjusted to 0.95 to get nearly everything not white. The trace will contain some specles from the background like inklinea describe, but if you take break apart on the result of the trace you can select only the image and the trace representing the outline of the image and copy this to a new document. You will then leave the specles of the trace behind. Set the trace to have no fill, just stroke and mayby some outset to give room for a little distance to the outline.

     

    Traceoutline
  4. #4
    inklinea inklinea @inklinea⛰️

    That is very clever Ellen.

    Also thanks for posting the fix for the close curves extension in an earlier post :)

  5. #5
    Al Smith Al Smith @AplusGems

    Ellen your answer is exactly what I want but all I get is a black object no outline.  You mention something about "break apart", trace no fill , just stroke.  and outset.  Unfortunately I am a newby for this program and have no idea how you did it other than setting brightness to 0.95. Is it possible to give me a step by step  procedure?  

    I would like to thank all people that contributed an answer to my outline question.  I will be enabling "mousekeys"   this sounds as though it will be a big help. Thank you Inklinea

    Thanks again,

    Al Smith

  6. #6
    Ellen Wasbø Ellen Wasbø @EllenWasbo

    It is black because the path is filled - I had the same after tracing. Here is what you do after tracing with brightness 0.95:

    I will call the path/object you get after tracing for "the trace" for simplicity.

    Select the trace and break apart (Shift+Ctrl+K)

    Select the largest black object (the trace you want to keep) and hold Shift while selecting the image too (just click somewhere in the background part of the image)

    Copy the selected to a new Inkscape document.. 

    Open the Fill and stroke window (Shift+Ctrl+F)

    Select the trace and set no fill (the first button with x) and set the stroke

    If you want a margin between the stroke of the trace and the image you can use outset. Select the trace and hit Ctrl+). You can repeat it several times or adjust the step of how much the outset/inset will adjust for each step (if each step is very small you will barely be able to see the change). To adjust this go to Prefernces (Shift+Ctrl+P) and find Behavior > Steps > Outset/inset by...

     

  7. #7
    Al Smith Al Smith @AplusGems

    Ellen,       Thank you for all your help. I have now been able to successfully make the outline that you showed me.  Now I want to be able to remove the background from other pictures.  I'm unable to find any useful instructions or videos that are helpful, the SIOX command may help but no info.   Should I post a new question?  I feel guilty asking  you all these questions. 

    All the best,

    Al Smith

  8. #8
    Ellen Wasbø Ellen Wasbø @EllenWasbo

    For removing backgrounds I am using Photoshop - so no experience on that using Inkscape. If you do not have Photoshop - Gimp might be a good open source alternative. Inkscape is dedicated to vector graphics so other softwares dedicated to raster graphics will work better on such tasks.

  9. #9
    Tyler Durden Tyler Durden @TylerDurden

    +1 for GIMP. Excellent companion to Inkscape.