Strange Stroke behaviour

A
Posted By
Algirdas
Dec 7, 2008
Views
478
Replies
14
Status
Closed
Hello,

since CS4 broke selections contract functionality, I tried to do it this way

Select > All
Select > Modify > Border > 1 px
Select > Invert

This leaves me with selected all pixels but one.

Now I try to do
Edit > Stroke > 1px, Inside

This creates two pixel stroke instead! Why 🙁

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

F
Freeagent
Dec 7, 2008
Border is feathered, that’s why this happens.

Here’s from the help:

For example, a border width of 20 pixels creates a new, soft-edged selection that extends 10 pixels inside the original selection border and 10 pixels outside it
A
Algirdas
Dec 19, 2008
So how do I actually make an action which puts one line stroke around the image..?
F
Freeagent
Dec 19, 2008
I’d just expand 2 px in Canvas Size with background color set to black.
JR
John_R_Nielsen
Dec 19, 2008
Why not just Select > All, Edit > Stroke (1px inside), Deselect?
F
Freeagent
Dec 19, 2008
Too obvious…?

Just kidding, that’s it of course.
A
Algirdas
Dec 20, 2008
I’m terribly sorry, but I’ve given wrong question at first. What I need, is a 1px stroke at -1px from border (leaving 1 px..)
JJ
John Joslin
Dec 20, 2008
Select > All
Select > Modify > Contract > 1 pixel
Edit stroke > 1 pixel
A
Algirdas
Dec 20, 2008
Aha, first one doesnt work in cs3, second one is not universal, for different dimensions % is different, and sometimes it’s not even possible get correct %..
JJ
John Joslin
Dec 20, 2008
The first one does work in CS3 I checked it.

The second is best done by eye using the scrubby sliders. (No good if you want it as an action though.)
JJ
John Joslin
Dec 20, 2008
For an action try this from Photoshop CS4 Help:

1. Double click the background layer and change its name to Layer 0.

2. Control-J to duplicate the layer. You can turn off the visibility of Layer 0 now.

3. Change the canvas size. Make sure relative is checked and that inches is changed to pixels. Type in 2 for values. This will give you a 2 pixel transparent area around the canvas. Control click on the layers thumbnail to select the non-transparent areas of the layer (this will match your original canvas size).

4. Run smooth from the Select-Modify menu with what you normally use.

5. Go to Image-Trim. Make sure it says Based on Transparency and that all four of the boxes are checked so that it trims evenly. This will get you back to your original, unaltered, canvas size. And with the selection still active.

6. Go to layer-New- and choose Background from Layer. This will place the layer at the base of the stack with the selection still active.

7. Add your white pixel workflow to the action to get it all done with in one click. If the smooth needs to be modified select the box next to the smooth command in the action. It will turn red and when you run the action it will stop there for new values and finish after that.
JR
John_R_Nielsen
Dec 20, 2008
Select All
Quick Mask Mode
Edit > Stroke (1 pix inside)
Standard Mode
Edit > Stroke (1 pix inside)
JR
John_R_Nielsen
Dec 20, 2008
Make that:

Select All
Quick Mask Mode
Select All
Edit > Stroke (1 pix inside)
Standard Mode
Edit > Stroke (1 pix inside)
BF
Brian_Fritz
Jan 2, 2009
Why can’t I contract from the edge of my document in CS4? this worked fine in CS3… I use this method a lot for making 1px borders

Select All
Select > Modify > Contract (1px) done…

but in CS4 if the selection is touching all 4 corners this option is disabled!?!? or any corner that it is touching won’t contract… help!
PR
Paul_R
Jan 2, 2009
You could use a script to select all minus one pixel and create a shortcut or an action to it.

#target photoshop

var strtRulerUnits = app.preferences.rulerUnits;

var strtTypeUnits = app.preferences.typeUnits;

app.preferences.rulerUnits = Units.PIXELS;

app.preferences.typeUnits = TypeUnits.PIXELS;

var LB= activeDocument.activeLayer.bounds;

activeDocument.selection.select([[LB[0]+1,LB[1]+1], [LB[2]-1,LB[1]+1], [LB[2]-1,LB[3]-1], [LB[0]+1, LB[3]-1]], SelectionType.REPLACE, 0, false);

app.preferences.rulerUnits = strtRulerUnits;

app.preferences.typeUnits = strtTypeUnits;

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections