Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to limit area affected by a filter by using selction?

Status
Not open for further replies.

mistercitizen

Technical User
Apr 1, 2004
188
AU
I'm experiencing a strange phenomenon. A filter I'm using (halftone pattern > line) seems to be affected by the pixels in the negative space, outside of my selection.

To clarify, the filter is still only affects pixels within the boundaries of my selection, however the final pattern is influenced by the pixels outside of the selction.

In this instance, I'm applying the filter to a single greyscale channel (all other channels are off). When I paint some grey areas outside of my selection, and then apply the filter to my selection, the effect is very different to what it would be if the area outside of my selection was blank.

It is as if the filter is using data outside of the selection in order to determine the final pattern.

I'm very puzzled. I am getting a different effect purely because I enlarge the canvas size. How can I stop this? Is there a way of limiting the data the filter uses to generate its result?

Thanks in advance. :)
 
This is normal for many filters. The idea is that the processing takes place in two stages:

1. Photoshop determines if a pixel is in the selected area, and therefore should be processed.

2. The filter itself takes over, which may use surrounding pixels in its calculations regardless of whether or not they are in the selection.

All you can do to stop it is to add suitable pixels outside the selection to control the effect. In your case, these may be black, white, or a particular shade of gray, depending on the image. Try out a few combinations until you get it right, then delete any excess pixels after you've applied the filter.
 
Is it just me, or is that a very imprecise and laborious way to control a filter's effect?

Surely the programmers of Photoshop have included a better way to control this! Any ideas would be greatly appreciated.

Thanks.
 
It's not a fault with Photoshop. You've defined a selection, and it has applied the filter to that selection. However, the filter itself has to get it's information from somewhere.

Suppose, for example, you have a filter that shifts all pixels to the right. When you make a selection and apply it, what should happen to the leftmost pixels? Leave them blank, or fill with the background color? Leave the original pixels there, or would that be interpreted as not applying the filter to part of the selection? What if you wanted the left pixels to reflect the shift too?

The point is, while there are always situations where this behavior is undesirable, more often than not it's exactly what's required, which is probably why it's the default. Some filters, such as Lens Blur, handle selections in quite a sophisticated way, but most don't. Unfortunately, some situations, such as yours, require either a third party filter, or a workaround.
 
Can't you cut and paste your selection to a new layer and apply the filter there
 
It may give you a different result, but the root problem is still there. The filter will still use pixels outside the selected area in its calculations.
 
Good point, but I guess you could copy a layer > filter > make selection > inverse selection > delete
 
Good point, but I guess you could copy a layer > filter > make selection > inverse selection > delete"

Thanks for your suggestions. Although in a format such as the multi-channel color mode you are unable to create more than one layer.

Thanks for the lo-down on how filters work Blueark. You've cleared that up for me.
 
If one of your channels is black (or grayscale), you don't have to use multichannel mode. Stay in grayscale mode, and in the Channels palette menu, add a new spot color. That way, you can use both layers and spot colors. You can always change back to multichannel later on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top