Post Reply 

1 pixel wide line with feathering

Jun 12, 2012, 14:06 (This post was last modified: Jun 12, 2012 15:01 by spiderplant0.)
Post: #1
1 pixel wide line with feathering
I'm trying to create 1 pixel wide borders for some web buttons. I've tried to use the GIMP path tool to do this but I can't figure out how to get it looking right. See attached image.

1 - copied from a button I found on a web-page. This is what I want - single pixel horizontal and vertical lines with feathering on the curved bits.

2 - path that I used to generate the images on the right.

3 - 'Stroke Path' with 1px brush size & no antialiasing. Corners are not smooth.

4 - 'Stroke Path' with 1px brush size & anti-aliasing. Straight lines are too fuzzy as they are 2 pixel wide rather than 1.

Is there a way to do this with the path tool or any other way with the GIMP?

   
Find all posts by this user
Quote this message in a reply
Jun 12, 2012, 16:11
Post: #2
RE: 1 pixel wide line with feathering
(Jun 12, 2012 14:06)spiderplant0 Wrote:  I'm trying to create 1 pixel wide borders for some web buttons. I've tried to use the GIMP path tool to do this but I can't figure out how to get it looking right. See attached image.

1 - copied from a button I found on a web-page. This is what I want - single pixel horizontal and vertical lines with feathering on the curved bits.

2 - path that I used to generate the images on the right.

3 - 'Stroke Path' with 1px brush size & no antialiasing. Corners are not smooth.

4 - 'Stroke Path' with 1px brush size & anti-aliasing. Straight lines are too fuzzy as they are 2 pixel wide rather than 1.

Is there a way to do this with the path tool or any other way with the GIMP?
Yes, but your path has to be on half-pixel coordinates. For the image below, I use the rounded-rectangle path generator from shape-path script with top/left/right/bottom set to 24.5/24.5/74.5/74.5 and corner radiuses of 5. Then Edit/stroke with a 1px line;

   

Of course stroking with 3 pixels is also sharp but stroking with 2 pixels is blurry (but is OK if the path is on full-pixel coordinates)

[Image: 2Tvo0.png]

Find all posts by this user
Quote this message in a reply
Jun 14, 2012, 10:49
Post: #3
RE: 1 pixel wide line with feathering
Thanks. Thats just what I was looking for. One other thing though, when manually creating a path, is there a way in GIMP to align or snap to 1/2 pixels? The grid doesnt allow 1/2 pixel resolution. One idea I came across was to scale the image up by x2, align to 1px grid, then scale down again. Dont know if repeated scaling up and down will start to smear pixels in other parts of the image though. Do you know if there any other more direct methods of aligning to 0.5px? I did a search for path shrink script but couldnt find anything.
Find all posts by this user
Quote this message in a reply
Jun 14, 2012, 12:00
Post: #4
RE: 1 pixel wide line with feathering
I have a path-shift script, among other things. The whole collection is there:

http://gimp-path-tools.sourceforge.net/index.shtml

Have fun.

[Image: 2Tvo0.png]

Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Help transforming a pasted line viccivi 3 67 Nov 19, 2014 14:52
Last Post: ofnuts
  Can't find line tool? FluffyMuffins230 9 231 Nov 18, 2014 14:29
Last Post: viccivi
  Recommendations for Black & White line art? cat_s 3 137 Nov 8, 2014 20:01
Last Post: ofnuts
  Pixel Effect shlomiabo 8 161 Oct 28, 2014 21:17
Last Post: fluffybunny2
  Changing a silhouette to line art Tropdoug 7 201 Oct 13, 2014 11:28
Last Post: ofnuts

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS