0

So for a wallpaper I'm making, I'm trying to edit this image so instead of a solid image like this, I am hoping to change this so it's just an 8-pixel outline. So the outside edges of the image is just an outline, with a width of 8 pixels. Is there a simple way to do this in a software like GIMP?

fursona

1

With Gimp:

  • Layer > Transparency > Alpha to selection
  • Select > To Path
  • Select > None (if you forget this, the outline will be half-width, and inside your current image)
  • Hide the layer, add a new layer
  • Edit > Stroke path, in Stroke line mode. You may want to explore Line styles, in particular the "Join" types (used Miter below)

enter image description here

PS: There is also a more direct Edit > Stroke selection but the results are usually poor.

1

Trace it in Inkscape:

enter image description here

Remove the fill color, insert a stroke which has the look you want:

enter image description here

You must experiment with the tracing settings to get the best possible result. Note that Inkscape makes a vector path which can be saved as SVG and used as a path in GIMP.

Note that half of the stroke width is outside the original shape area. You can fix it by making a half of the stroke width inset by inserting effect Path > Dynamic Offset. You can fix the effect by applying Path > Object to Path.

ADD: If you zoom in the tracing result before any edits you'll see that the edge goes through the edge pixels of the original bitmap shape, it doesn't go a zigzag along the pixel borders - no matter, if all cleaning and smoothing options are OFF and the tracing treshold has been lifted near white:

enter image description here

That's how tracing works. If you need the original pixelated edge you'll do better by staying in bitmap domain. In GIMP you should make a selection which contains the shape and shrink the selection that 8 pixels:

enter image description here

I selected the transparency by clicking it with the select by color tool, inverted the selection and applied Select > Shrink > 8 px.

Delete the interior by pressing DEL:

enter image description here

4500% zoom in shows that the result is as perfect as your original edge was:

enter image description here

To keep the sharpness the antialising was OFF in the tool options of Select by Color. Having it ON would make the edge smooth by inserting half transparent pixels.

2
  • I got Inkskape for Ubuntu 20.04, so I guess that will work. Is it possible to make the color the same one that's inside the image?
    – Achak Claw
    Nov 25 at 1:26
  • @AchakClaw Yes, you can change the stroke colour to anything you want. You can even colour a stroke with a gradient.
    – Billy Kerr
    Nov 25 at 19:44

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.