Gimp-Forum.net
How do I prevent the outline from dipping into an image that has gaps inside it? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: How do I prevent the outline from dipping into an image that has gaps inside it? (/Thread-How-do-I-prevent-the-outline-from-dipping-into-an-image-that-has-gaps-inside-it)

Pages: 1 2 3


How do I prevent the outline from dipping into an image that has gaps inside it? - marigolden - 11-22-2019

Try to outline an image that contains gaps. Even if I block off the gaps on the very outside by painting over where it meets the outside, it still leaks into the image. Any way to fix this?

https://imgur.com/a/Tah1Gkk


RE: How do I prevent the outline from dipping into an image that has gaps inside it? - denzjos - 11-23-2019

I think you used the fuzzy select tool to isolate the snowman. If the color of the gaps is the same color of the surroundings (can't see because the original is not posted) it is a little tricky with this tool. If the color of the gaps is a little different you can deselect everything under the tool options ( antiliasing, feather edges, etc...if you first select the fuzzy tool) and try different values for the threshold. If that is not the solution, you can paint the gaps with the paintbrush tool, not much work, it is a simple drawing. You can always use the scissors select tool, but that is more time comsuming.


RE: How do I prevent the outline from dipping into an image that has gaps inside it? - rich2005 - 11-23-2019

A bit short on how you obtained the selection Wink but it might go like this: Check on the screenshots as you go along.

https://i.imgur.com/2rMNTWs.jpg
Making the selection: For an image with a transparent background you might use Layer -> Transparency -> Alpha to Selection

Stroking that selection either on the layer or on a new layer under fills in the small transparent areas in the foreground.

https://i.imgur.com/TRju1kd.jpg
You need to 'lose' those small areas of selection. One of the Gimp Selection tools is 'quickmask' Either Select -> QuickMask or shift-Q or the little square icon bottom left in the Gimp window. Three ways of getting it. That is how important it is. With the quickmask on transparency shows as red. Paint in the canvas with Black to make a selection. Paint in the canvas with White to remove a selection. The X key swaps FG/BG colours Assigned for the purpose.

With white brush paint out those litttle selected areas. Toggle the quickmask off. Now you can stroke the selection for just the outline.


RE: How do I prevent the outline from dipping into an image that has gaps inside it? - marigolden - 11-23-2019

Just posted the original. Yes, I used a path tool to get rid of the surrounding bubbles and then used fuzzy select to get rid of the color closer surrounding the snowman which didn't have bubbles. The gaps were indeed the same color of the surrounding, hence why I call them gaps. I just don't get why the outline (using the grow/paint bucket tool) would leak into them if I closed off the ends. I did that on those 2 sections I drew attention to with the arrows. But as you can see the outline color still went inside the image. The effect I want is for the gaps to be left alone, *not* colored in. I want the outline on the outside of the image, and uncolored gaps maintained in the image. I mean I'd accept white but since it would make no difference to be to have gaps vs white, since its background will be white, I was hoping for some way to make the outline effectively pass over those openings?

(11-23-2019, 11:53 AM)rich2005 Wrote: A bit short on how you obtained the selection Wink but it might go like this: Check on the screenshots as you go along.

https://i.imgur.com/2rMNTWs.jpg
Making the selection: For an image with a transparent background you might use Layer -> Transparency -> Alpha to Selection

Stroking that selection either on the layer or on a new layer under fills in the small transparent areas in the foreground.

https://i.imgur.com/TRju1kd.jpg
You need to 'lose' those small areas of selection. One of the Gimp Selection tools is 'quickmask' Either Select -> QuickMask or shift-Q or the little square icon bottom left in the Gimp window. Three ways of getting it. That is how important it is. With the quickmask on transparency shows as red. Paint in the canvas with Black to make a selection. Paint in the canvas with White to remove a selection. The X key swaps FG/BG colours Assigned for the purpose.

With white brush paint out those litttle selected areas. Toggle the quickmask off. Now you can stroke the selection for just the outline.

Very interesting thanks!! A bit confused--
Quote:Paint in the canvas with Black to make a selection. Paint in the canvas with White to remove a selection...With white brush paint out those litttle selected areas.

What do you mean make/remove a selection? Which part? And if I should paint the canvas with white, why would I them go into the gaps with the same color they would already have become?

Quote:Making the selection: For an image with a transparent background you might use Layer -> Transparency -> Alpha to Selection
Indeed that's what I did, I don't know if you can tell but the second image actually has an outline, it's a grey outline so it's very similar to the alpha channel color but if you look close you can tell the difference. But I didn't stroke the selection after, instead on a layer beneath the image I used the paint bucket tool. It is the same result as with your stroking method yes?


RE: How do I prevent the outline from dipping into an image that has gaps inside it? - Blighty - 11-23-2019

1. You have closed off some of the gaps, but not all of them. Make sure all are closed.

2. Make sure you are using the Fuzzy Select tool (not the Color Select Tool) to select the background.

3. The gray background is quite similar to the white in the image, so use a low threshold for the Fuzzy Select Tool. About 3.

4. The gray background is not a single colour, but has a slight gradient. So put the Fuzzy Select Tool into "Add to current selection" mode. Click the background several times (about 5 or 6) to get all the background selected.


RE: How do I prevent the outline from dipping into an image that has gaps inside it? - marigolden - 11-23-2019

(11-23-2019, 12:44 PM)Blighty Wrote: 1. You have closed off some of the gaps, but not all of them. Make sure all are closed.

2. Make sure you are using the Fuzzy Select tool (not the Color Select Tool) to select the background.

3. The gray background is quite similar to the white in the image, so use a low threshold for the Fuzzy Select Tool. About 3.

4. The gray background is not a single colour, but has a slight gradient. So put the Fuzzy Select Tool into "Add to current selection" mode. Click the background several times (about 5 or 6) to get all the background selected.

1. The thing is I had tried it with closing all the gaps but it still didn't work! Then I had x'ed out without saving thinking it was impossible, then thought to ask here and just did those 2 parts to demonstrate how it didn't work.

2. Wait when am I to use fuzzy select? I only used that when I got rid of the background it came with. To input the outline I just put a layer under, right clicked on the image layer for Alpha to Selection, rt clicked image for select>grow, and did it by 1pixel, then switched to new layer to click the image using the paintbucket. Hope you can clarify at what point fuzzy select should be?
3. Ahh I just noticed when I select fuzzy select tool the menu at the right side including threshold! I presume that means it's more sensitive to color variation. The default it's on is 15. Any particular number or just play round with it?
4. By background do you mean the outline because I put it on a new layer? I don't know how it could possibly get a gradient because I just used the plain paintbucket tool. I'll attach the image here, maybe you could better figure out why it seems to be a gradient? ?

Thanks for your great analysis!!!


RE: How do I prevent the outline from dipping into an image that has gaps inside it? - rich2005 - 11-23-2019

Quote:Very interesting thanks!! A bit confused--
What do you mean make/remove a selection? Which part? And if I should paint the canvas with white, why would I them go into the gaps with the same color they would already have become?

You are not painting on the image, you are painting in the quick-mask which means you are painting in - creating or modifying - a selection.

This might make it more understandable.  https://youtu.be/mZaYuTBofgQ  duration 2 and a bit minutes





Quote:But I didn't stroke the selection after, instead on a layer beneath the image I used the paint bucket tool. It is the same result as with your stroking method yes?

No, bucket fill will fill the whole selection, while stroke is along the selection. I can see your intention using a fill.


RE: How do I prevent the outline from dipping into an image that has gaps inside it? - marigolden - 11-23-2019

(11-23-2019, 01:32 PM)rich2005 Wrote:
Quote:Very interesting thanks!! A bit confused--
What do you mean make/remove a selection? Which part? And if I should paint the canvas with white, why would I them go into the gaps with the same color they would already have become?

You are not painting on the image, you are painting in the quick-mask which means you are painting in - creating or modifying - a selection.

This might make it more understandable.  https://youtu.be/mZaYuTBofgQ  duration 2 and a bit minutes





Quote:But I didn't stroke the selection after, instead on a layer beneath the image I used the paint bucket tool. It is the same result as with your stroking method yes?

No, bucket fill will fill the whole selection, while stroke is along the selection. I can see your intention using a fill.

Ahh...I see. I've never heard of this tool before. Thank you soo much for making a video just for this! I will follow the steps in the video


RE: How do I prevent the outline from dipping into an image that has gaps inside it? - rich2005 - 11-23-2019

(11-23-2019, 02:18 PM)marigolden Wrote: Ahh...I see. I've never heard of this tool before. Thank you soo much for making a video just for this! I will follow the steps in the video

Brain not working today. In the commentary I said paint black for selection, it is of course paint white for selection..but the video is still correct.


RE: How do I prevent the outline from dipping into an image that has gaps inside it? - marigolden - 11-23-2019

(11-23-2019, 02:29 PM)rich2005 Wrote:
(11-23-2019, 02:18 PM)marigolden Wrote: Ahh...I see. I've never heard of this tool before. Thank you soo much for making a video just for this! I will follow the steps in the video  

Brain not working today. In the commentary I said paint black for selection, it is of course paint white for selection..but the video is still correct.
Ohh ok thanks! I happened to only get around to it before seeing this so no issue! 
I followed the steps and it did work!! The only thing is, while the inside isn't being infiltrared by the grey outline color now, it is a slightly darker shade from white. Not sure why?? I used pure white to paint it in in the quick mask mode. File is attached
https://imgur.com/a/4ZIaIWP