What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Unwanted outline on "lasso'd" and "rotated" selection in new layer


mechanic

New Member
Messages
4
Likes
1
As a test, open a new file and fill it with all black, then use the lasso tool (with zero feather and no anti-alias checked) to outline a closed area within. Then copy and paste this selection to a new layer. Unclick the background layer so that you can see the new layer is all blank except for the black area you lasso'ed. Then use the rotate transformation to rotate your black area a few degrees, and apply this transformation. Select "ALL" and copy this layer to the clipboard.

Now go to MSpaint and create a new file and fill it with all black, then paste from the clipboard (with the "non-overlay all white" box selected) - you will see a gray outline around the area you lasso'ed in Photoshop (CS2). You can use the color inspector in MSpaint to see that photoshop created a 1 to 2 pixel outline around your lasso'ed, rotated selection, with a color of about 240.

The question then is: How can I get Photoshop CS2 to stop adding this gray outline around my lasso'ed, rotated selection?

Since I used a feather of 0, with no anti-alias, I assumed no outline would be added.

My workaround for this is to rotate the entire file FIRST, then use the lasso tool to select the area I want, and then copy and paste this area into a new layer, and, then copy the entire new layer to the clipboard, and no outline shows up when i paste it into MSPAINT. Apparantly, Photoshop CS2 adds the outline as part of the rotate transformation of a lasso'ed selection copied and pasted into a new layer.

I hope this explanation and question isn't too hard to follow.
 
Last edited:

MrToM

Guru
Messages
3,595
Likes
3,321
I don't have MSPaint as I'm on a later version of windows but I've tried your example in Windows Paint and it works fine.

I did however manage to replicate your problem.

I can't guarantee this will also work in MSPaint but here's what to try...

When you use the transform to rotate the image make sure 'Interpolation' is set to 'Nearest Neighbor' (Whatever a 'Neighbor' is ;))

Transforms use interpolation in just the same way that re-sampling does.
Anything BUT 'Nearest Neighbor' will interpolate the image with anti-aliasing...bicubic, bicubic smoother, bilinear etc.

Nearest Neighbor keeps transparency to either an on / off status, no anti-aliasing.
AFAIK Paint doesn't handle graduated transparency...you either have it or you don't, much like a 'gif' format.
In the same way 'gif' handles graduated transparency, Paint adds coloured pixels when the transparency is anything between 1-99%.

With 'gif' you can set this 'colour' to be the background colour of your page via the 'matte' colour option.
This enables you to 'fake' graduated transparency in a 'gif' by using the same background colour...of course this fails if the background colour ever changes.

I have no idea if MSPaint also has this option.....I'm guessing not, so anything transparent will have have very sharp edges.

Thats about all I can tell you I'm afraid.

One question though which I'm sure everyone here is dying to know the answer to...

...why on earth are you using MSPAINT ?

Regards.
MrTom.
 

mechanic

New Member
Messages
4
Likes
1
Thank you, MrTom!

I'm sure glad I found this website - that was just what I needed. I hadn't yet explored the "preferences" option under "edit", and I found the "interpolation" option under "general" preferences. It offered "nearest neighbor" as well as "bicubic", which I guess was the default as that is what it had already been set to.

I knew Photoshop just had to have a way to inhibit any feathering - thanks - problem solved.

The reason I use Mspaint at the end is for the bezier tool in Mspaint.
I would like to learn how to write plug-ins, but I think it is probably over my head - but, if I could, I'd write a bezier tool plug-in that strokes your path AS YOU CRAFT IT. I never use the pen tool/stroke facility because I can't see what it will look like while I am specifying the path, but only afterwards when I "stroke" it - it usually needs tweeking and that is a lot of "backwards" clicking and then back in the dark again.

This website is wonderful.
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
mechanic said:
I never use the pen tool/stroke facility because I can't see what it will look like while I am specifying the path, but only afterwards when I "stroke" it - it usually needs tweeking and that is a lot of "backwards" clicking and then back in the dark again.

Set your Pen Tool to shape. Turn off the fill. Set the stroke color. Set the stroke width. Set the stroke shape type. Let her rip. The stroke will be applied even if you move the path.

Screen Shot 2015-01-06 at 6.36.38 PM.png
 

MrToM

Guru
Messages
3,595
Likes
3,321
Glad to have helped......and allow me to continue...

If you use the 'Pen' tool set to 'Shape' you can set the fill to 'None' and the stroke to 'n pixels'.

When you create your 'path' it will be be stroked as you go.

If you need to create an 'open' path still use 'shape'....it'll still work.

I see Sam has jumped in ahead of me yet again......darn that guy!
I'm POSITIVE he can see what I'm doing.

Regards.
MrTom.
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
LOL!! I wish I could read your mind.............other than the voices, I would know twice as much about Photoshop as I currently do!
 

MrToM

Guru
Messages
3,595
Likes
3,321
...LOL!! I wish I could read your mind...
No you don't....seriously, you don't.....it would take you too long to clean it.

Isn't that right Jimmy?
(Jimmy nods in agreement.......I've given him a fish too....he's a happy penguin now.)

Regards.
MrTom.
 

mechanic

New Member
Messages
4
Likes
1
To MrTom and IAmSam,

My photoshop CS2 doesn't have the tool bar (the one shown on your attached photo) like yours. Mine does not have an option to "stroke", nor set the pixel width. The tool bar (on top) that I get only allows for creating a path, and the fill button doesn't function (clicking on it has no effect). Could it be that CS2 didn't have the pen tool fully developed yet, like you indicate in your post?

If I need to upgrade, which version first introduced automatic stroking?
And I'm not sure if you understood that I use the bezier tool for making CURVED lines, not just straight lines - does the example you mentioned allow for making true curved bezier lines?

As an example, suppose you have a photo of a flower, and the background is variable and a portion of one of the petals gets so blurry, with the near same color background, that one needs to draw a small thin line for visual effect to enhance the boundary of the pedal where it is fuzzy, using a compatible, but slightly distinguishable, color for the curved line - that can be done in about 10 seconds using the bezier tool in MSpaint. But, in my CS2 version, it is almost an impossible task unless I have a very steady hand and can use freeform like a machine, which I really can't (when I try, it always reveals juts and jags). If your version allows for that, then I may need to upgrade.
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
To MrTom and IAmSam,

My photoshop CS2 doesn't have the tool bar (the one shown on your attached photo) like yours. Mine does not have an option to "stroke", nor set the pixel width. The tool bar (on top) that I get only allows for creating a path, and the fill button doesn't function (clicking on it has no effect). Could it be that CS2 didn't have the pen tool fully developed yet, like you indicate in your post?

If I need to upgrade, which version first introduced automatic stroking?
And I'm not sure if you understood that I use the bezier tool for making CURVED lines, not just straight lines - does the example you mentioned allow for making true curved bezier lines?

As an example, suppose you have a photo of a flower, and the background is variable and a portion of one of the petals gets so blurry, with the near same color background, that one needs to draw a small thin line for visual effect to enhance the boundary of the pedal where it is fuzzy, using a compatible, but slightly distinguishable, color for the curved line - that can be done in about 10 seconds using the bezier tool in MSpaint. But, in my CS2 version, it is almost an impossible task unless I have a very steady hand and can use freeform like a machine, which I really can't (when I try, it always reveals juts and jags). If your version allows for that, then I may need to upgrade.

I'm not certain about CS2, I'll have to check on that.

But the answer to your curved line questions is yes. There's nothing better for creating perfect curved lines, that match exactly to your images.

Me personally, if I'm understanding you correctly, I would not use the technique you describe at all for that purpose. Before I explain how I would do it, I will need to see and example (image) of the problem your describing that you feel only the bezier tool in MSPaint can accomplish. It may be that your just not aware of an easier way to do the task in Photoshop (any version).
 

MrToM

Guru
Messages
3,595
Likes
3,321
Yeah....in CS2 you'll have to set up a 'Style' first and use that when you create a path.

1. Create a new document .... anything will do.
2. Select the 'Pen' tool, set to 'Shape' and create a closed path.
3. From the Layers panel select 'fx' and 'Stroke'.
4. Set up your stroke. (This can be changed later)
5. If you do not want a fill then click on 'Blending options' (Top of the window on the left) and set 'Fill Opacity' to zero.
6. Click on 'New Style'.
7. Enter a name for your new style......."2px stroke no fill" or whatever.
8. 'OK' your way out.

You should now find that the 'Style' has automatically changed to the style you just saved.....meaning any 'Shape' will now be created with that style....in real time.

CS2_styles_A_01].png

If that style isn't quite how you want it you can always edit the style on a per layer basis from the layers panel.

I guess because this is quite a convoluted way of doing things that it was updated in later versions.

Regards.
MrTom.
 

mechanic

New Member
Messages
4
Likes
1
Flower1a.jpgFlower2.jpgFlower3.jpgCS2.jpg

I include (above) 4 small jpegs to demonstrate my use of the bezier tool. Flower1a is the original, with white arrows pointing to where I intend to enhance the boundary between two pedals. Flower2 is the first attempt, where the fix on the right is a bit off, and needs to be changed. Flower3 is where I fixed the one on the right. You can see this is very subtle, but I haven't known how to do this in Photoshop, until now and I certainly intend to follow your outstanding directions to set up my own style. This took about 10 seconds in MSpaint.

The attached photo CS2 is what the upper screen of my version looks like when I select the pen tool with the photo in question.

Thanks a lot, guys, I got some learnin' to do here. I can't believe I've been fiddling around with CS2 for several years now and didn't know these things - I guess I'm about 5% of what I need to know.
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
Based on what I see and understand........this is a job for the Brush Tool.
 

Tom Mann

Guru
Messages
7,223
Likes
4,343
@Mr.T - "Transforms use interpolation in just the same way that re-sampling does. Anything BUT 'Nearest Neighbor' will interpolate the image with anti-aliasing...bicubic, bicubic smoother, bilinear etc".

It never ceases to amaze me how many otherwise knowledgeable PS people don't know this. Not only does this cause problems such as described above, even something as simple as rotation of a photo by a few degrees to level the horizon will cause a loss of sharpness at the pixel level. Do a few rotations in a row (ie, instead of using a smart object), and the degradation in image quality can be noticeable, even by non-pixel-peepers. However, in photography and many other applications of PS, there is absolutely no way a nearest neighbor interpolation can be used for rotations because of all the stair-step artifacts it introduces.

AFAIK, the only ways around this are:

a) Use a smart object if you can live with the blurring from one rotation, but you may need to tweak the angle several times; or,

b) Up-rez the image by a large factor, do the rotation, and then down-rez the rotated version by the same factor. Doing nothing more than up- and down-rez'ing an image introduces its own artifacts, but often these are smaller / more acceptable than the smart object approach.

Tom M
 

Tom Mann

Guru
Messages
7,223
Likes
4,343
MrTom - This is weird ... I would have sworn that, exactly as you suggested, changing the default image interpolation method always changed the results of rotations (of bit maps) at the pixel level.

Maybe I'm not fully awake yet, but when I just tried to make a demo of this this in CC 2014 PS to post in the thread, there was absolutely no difference in doing a 10 degree rotation of an image layer with the default image interpolation preference set to NN versus with it set to bicubic. Am I having an old-timer's moment, or have they changed something recently? Have you tested this yourself on a new version of PS?

Tom M
 

MrToM

Guru
Messages
3,595
Likes
3,321
Hi Mr Mann,

I did test it before my post yes, in CC 2014 too.

For me, NN is the only one which doesn't anti-alias.....which is good considering that's what its for.

I haven't tried this but may it be the interpolation setting in preferences?

With 3 ways to set interpolation its difficult to really know what's controlling what and when!
Does the Preferences setting affect the Image Size setting?

What IS the preferences setting for exactly?
I mean, interpolation can be selected and even turned off when re-sampling anyway and now in CC the transforms have their own dropdown list so.....what does that setting relate too?

Is it when using SFW?

If it helps I have:
Preferences :: Bicubic
Image Size :: OFF
Transform :: to taste

I doubt you have anything much different.

I really don't know what else to suggest, sorry.

Regards.
MrTom.
 
Last edited:

Tom Mann

Guru
Messages
7,223
Likes
4,343
Thanks, Mr.T - It was indeed a brain fart, LOL. I thought that when one set the default interpolation method in "Preferences" it automatically changed the default method in both "Image Size" and "Transform". I now see that it doesn't do this. Maybe it did so in older versions, but certainly not now. Anyway, when I set it to NN in "Transform / rotate", it gave the sharp but stair-step result, as expected, and as you said.

Thanks again,

Tom M
 

MrToM

Guru
Messages
3,595
Likes
3,321
LOL.....No worries.

It used to be a right pain in earlier versions as the interpolation for transforms is linked to the Image Size setting.

Many times I used to turn that off when changing the resolution of an image but then forget to turn it back on again after....needless to say subsequent transforms would then default to the preferences setting (I think?)....which would usually not be what I wanted.

Now that transforms have their own settings in CC its much easier to use....so much so that I now use it more often.

Still not sure what the preferences interpolation setting does now...any idea's on that?

At least you've got it sorted anyway.......brain burp or otherwise.

Regards.
MrTom.
 

Top