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!

Why is PS allowing paint to spill outside of selections?


foxdog175

Member
Messages
7
Likes
0
So, I have an image at high resolution. I want to cut an object out of the image, and then scale the image down to a smaller size. Now, when I command-click my cut out object, I receive a selection.

However, when I try to paint within that selection, paint spills out onto pixels that are Not part of the selection. Does anyone know why this is happening? With the work I'm doing, it's imperative that the only part of my image that is being manipulated is my exact selection, and not a pixel over. But I can't understand why Photoshop is allowing a few pixels outside of my selection border to be painted on.

Furthermore, if I were to do command-click my object for the selection and delete it out of the background image, it deletes the selection + a few extra pixels around the border. It's maddening. When I have a selection and manipulate the pixels within it, why is it also manipulating a small number of pixels surrounding the selection?

Posted below is a video I made to demonstrate the problem. I start with a higher res image, cut out the picture, cut the image size in half, and then command-click my object to get its selection. Then if I delete that object out of the original image, it does 2 things: 1) deletes more than my selection and 2) doesn't delete what's IN the selection entirely. The edge of the selection in some spots become transparent instead of it being gone.

Can anyone shed some light on this?

 
First of all, make sure you don't have Feather or Anti-Alias option turned on while making the selection. But, even so, the Resize Image command interpolates the content of the layer, meaning the resulting pixels are some function of their neighbors. That is - including the transparent pixels around your layer(they are just as legitimate part of you layer as opaque ones). So you bound to get semitransparent pixels around the border after resize or have this border distorted some way.
 
First of all, make sure you don't have Feather or Anti-Alias option turned on while making the selection. But, even so, the Resize Image command interpolates the content of the layer, meaning the resulting pixels are some function of their neighbors.

All irrelevant. The real issue here is that he should not have used a selection but a mask instead.
 
Are you always so rude?



Not with vector masks.

Hey Pswift. I'm sorry I wasn't able to respond this last weekend. I'm going to try to make a quick video tomorrow for you to show you Exactly what I'm trying to do. The mask idea didn't work -- but perhaps I wasn't using it properly.

Thanks again.

p.s. I'm going to repost this in the youtube reply.
 
Not with vector masks.

Your vector mask masks raster layer, which is a subject to blurring and distorting while resizing. And after resize your vector mask won't be relevant any more and won't correspond to the image part that was supposed to be masked.
 
SCTRWD, I'm starting to get tired because of your childish attitude on this forum. First you start with the "BS" comment and now you decide to purposely change your story;

Your vector mask masks raster layer, which is a subject to blurring and distorting while resizing.

Which totally contradicts what you said earlier, when you clearly talked about the burring and distorting of the mask and not the actual layer, I quote:

"The mask is just as a subject to blurring and distorting while resizing as any layer".
 
SCTRWD, I'm starting to get tired because of your childish attitude on this forum. First you start with the "BS" comment and now you decide to purposely change your story

The phrase "The mask is just as a subject to blurring and distorting while resizing as any layer", means just what it means: both mask and layer blur. Read it again, if it's not clear. I'm not saying BS this time, mind you:) It is the answer to you first mentioning of mask: while all the layers blur during resizing the masks don't stay intact - they blur too.

Then you came up with the idea of vector mask. To that I answered that you still would get blurred layer. But vector mask now wouldn't accurately mask blurred image as it did non-blurred one before resizing.

Just to sort things up:

1. You have transparent layer with opaque part, sharp border. After resize you'll get blurred layer with blurred semi-transparent border.

2. You have opaque layer with raster mask, sharp border. After resize you'll get blurred layer and blurred mask.

2. You have opaque layer with vector mask. After resize you'll get blurred layer and still sharp vector mask, which already doesn't correspond to the part of the layer it masked at the first place. Vector mask does a good job at masking objects with sharp clearly, defined contour. But it sucks with blurred ones.
 
This is exactly what I'm trying to accomplish. This video should be a much better demonstration of my problem. If you wouldn't mind, could you please take a look and give me your thoughts?

 
This is exactly what I'm trying to accomplish. This video should be a much better demonstration of my problem. If you wouldn't mind, could you please take a look and give me your thoughts?


Dear foxdog175, you are absolutely right: you do have semitransparent pixels in your layers after resize. It's an inherent effect of resize. Photoshop shows selection border (so called "marching ants") at 50% level of transparency of the current selection. And after resize it is not actually the same as before resize. It's blurred. Enter the Quick Mask mode and you'll see it yourself.

In your case I don't think there is an ultimate solution. You could try something, though. Don't bother with clone tool. You could try and boost the transparency of border pixels in your layers up to 100%. Unfortunately, Photoshop does not let do it easily(this feature has been in need for SO long, all to nothing). But you could use some filters. For example, the Synthetic->Filter Factory. Enter (a>0)? 256: 0 in the alpha channel field of the filter dialog and all semitransparent pixels would become absolutely opaque.

Of course, there still could appear overlap between your layers(they can be fixed). And there still could appear missing pixels, if you're really out of luck, that is:) (they can be fixed too).

But this is at least something you can try...

Or just merge your layers to a separate layer before resize and make them all over again after resize, using their transparencies.

Or use some non-interpolation method, like Nearest neighbor for your layers.
 
Ah, thanks for the information. The problem should be solved now. I'll know within a day or 2. I resized the image down twice. Once with nearest neighbor, and once with bicubic. The problem with NN is that it gives (obviously) jagged edges. So, I overlayed the NN layers on top of the bicubic, and deleted everything BUT where edges of my layers met eachother.

This seems to have solved my problem, but like I said, I'll know for sure by the end of the week.

Thanks again for your help in getting to the bottom of this.
 

Back
Top