Print Page | Close Window

Automated black outline help

Printed From: Pixel Joint
Category: The Lounge
Forum Name: Resources and Support
Forum Discription: Help your fellow pixel artists out with links to good tutorials, other forums, software, fonts, etc. Bugs and support issues should go here as well.
URL: https://pixeljoint.com/forum/forum_posts.asp?TID=8794
Printed Date: 13 September 2025 at 9:27am


Topic: Automated black outline help
Posted By: Konidias
Subject: Automated black outline help
Date Posted: 15 July 2009 at 10:50pm
So I'm trying out this new technique for making a massive amount of sprites, but the problem is that they have no outline and I want an outline around them. I can solve this by going into photoshop and just giving it a 1 pixel "outer glow" setting via blending options on the layer... but here is the problem:



The first circle would be the "raw" sprite. The second one is what I get with photoshop. The third one is after I've edited it to look how I want.

The bottom two images show what I'm trying to remove. Photoshop does a nice job of outlining, except it includes pixels for the corners. I only want to have it place pixels next to another pixel in the original raw sprite. (basically I don't want those red pixels)

Is there some sort of program or technique that can achieve this? I'd rather not have to hand remove all of those excess pixels out of hundreds of frames of sprite sheets.



Replies:
Posted By: Dr D
Date Posted: 15 July 2009 at 10:59pm
Did you try the stroke setting? It's under blending options too, at the very bottom. I'm not sure if it does the same thing.


Posted By: Hatch
Date Posted: 15 July 2009 at 11:24pm
1) Use magic wand to select the white or trans around sprite.
2) Select -> Modify > Contract...
3) Enter 1 px for the contract value.
4) Select -> Inverse
5) Use fillbucket on selected BG pixels in non-contiguous mode.

Make sure your BG color is not used in your sprite or it'll replace that color with black. If all your sprites are in one big image file (say, a spritesheet), this will do them all at once.

[EDIT]ed like a million times because I'm anal.

-------------


Posted By: Konidias
Date Posted: 15 July 2009 at 11:29pm
Originally posted by Hatch

1) Use magic wand to select the white or trans around sprite.
2) Select -> Modify > Contract...
3) Enter 1 px for the contract value.
4) Select -> Inverse
5) Use fillbucket on selected BG pixels in non-contiguous mode.

Make sure your BG color is not used in your sprite or it'll replace that color with black. If all your sprites are in one big image file (say, a spritesheet), this will do them all at once.

[EDIT]ed like a million times because I'm anal.

AWESOME! It works like a charm. Thanks a lot!

I tried the stroke blending option as well and that gives a similar result.. except it leaves light gray pixels in place of the ones I want removed. It's simple enough to flatten the layer from there and erase that gray color but the contract method does it perfectly in less steps.

Thanks again!


Posted By: Hatch
Date Posted: 15 July 2009 at 11:31pm
You could also make the BG black, then do steps 1-3, then just fill/erase the selected pixels. It amounts to the same thing, but I think it's a tad quicker.

-------------


Posted By: jalonso
Date Posted: 16 July 2009 at 7:54am
hmmm,????? I would never have thought of doing any of that. My way:

1) Use magic wand to select the area around the sprite/object.
2) Stroke
3) Enter 1 px for the value.
4) Select > Stroke Inside
5) Select color, if needed.




-------------
http://www.pixeljoint.com/forum/forum_posts.asp?TID=9378&FID=6&PR=3 - PJs FAQ <•> http://www.pixeljoint.com/forum/forum_topics.asp?FID=6 - Sticky Reads


Posted By: yrizoud
Date Posted: 16 July 2009 at 12:17pm
Shameless plug:
1) Use grafx2
2) Load the whole image as a brush
2) Select the "background color" according to your transparent color
3) Select black as foreground color and press 'O' once.
4) Save the brush.



Posted By: 7Soul
Date Posted: 17 July 2009 at 1:57pm
I just select it, pick the Marquee Tool, Right Click the selection > Stroke 1px Center


Posted By: Hatch
Date Posted: 17 July 2009 at 2:27pm
The trouble with your (and I think jal's) method is that it puts the stroke inside the object, destroying hand-placed pixels.

-------------


Posted By: 7Soul
Date Posted: 17 July 2009 at 3:04pm
Then you could invert the selection and the do that. The only problem in that it would stroke the canvas border


Posted By: Hatch
Date Posted: 17 July 2009 at 3:30pm
Oh, yeah, I just realized that's what jal was saying. Cool!

-------------



Print Page | Close Window