Photoshop action to select the center of an existing "ring" selection?

Redcrown

Senior Member
Messages
2,024
Solutions
7
Reaction score
683
Location
US
I'm using Generative Remove in Photoshop a lot. The one where you select an object and click "remove" on the Contextual Task Bar. My best method is to use a fairly hard round brush, go to Quick Mask mode, and carefully trace around the object edge. That leaves the task of filling in the center.

Not very hard - just paint it in, but... I'd like to make an Action to do that. So far, I'm stumped. I even asked ChatGPT and Gemini for help, with no success. So, any ideas or suggestions? How to take a "ring" selection and expand the selection to fill the center. Even when the selection is near or touching the edge of the frame.
 
I'm using Generative Remove in Photoshop a lot. The one where you select an object and click "remove" on the Contextual Task Bar. My best method is to use a fairly hard round brush, go to Quick Mask mode, and carefully trace around the object edge. That leaves the task of filling in the center.

Not very hard - just paint it in, but... I'd like to make an Action to do that. So far, I'm stumped. I even asked ChatGPT and Gemini for help, with no success. So, any ideas or suggestions? How to take a "ring" selection and expand the selection to fill the center. Even when the selection is near or touching the edge of the frame.
Hi Redcrown,

FYI, the Brush tool in Photoshop is considered a PAINTING TOOL, not a selection tool, so, I am not sure that will work for what you are trying to do. You might want to try using the Elliptical Marquee Tool, or even the Lasso Tool, to create your circles around the object. Both of those tools are indeed Selection Tools.

What I do, when trying to remove objects, is two fold. Depending on the size of the object to be removed.

First, if the object is not very big, I will use the "Remove Tool" and then select "Use Generative AI ON" in the remove Tool menu bar. That way, it uses Ai to remove the area and also uses Ai to predict how to fill the area. It is slower, but much better at predicting the area to be replaced.

If you want to try the "REMOVE TOOL", and select "Use Generative Ai OFF", it then is much faster, but it does not use AI, it uses surrounding pixels to predict what to replace.

If the area is much bigger that you want to replace, then I use the LASSO tool, to loosely select the area, and then use Generative Fill in the Contextual Task bar.

NOTE: Using the REMOVE tool does not use your Credits for Generative Fill. So, I try to use the remove tool as much as possible.

--
Major Jack
"You are welcome to retouch any photograph I post in these forums without prior consent from me". Have fun, and play as you wish.
 
Last edited:
Have a look at Tony Kuyper's free TK Selection Brush available from his web store at https://goodlight.us/panels-and-videos.html

Click to start painting either over or around object you want to select and click again to make selection. Sounds like what you are looking to achieve.
Thanks for sharing that link! I watched the video, and it makes sense HOW to use the Paint Brush with quick mask to make selections! But being honest, the Quick Selection Tool in Photoshop is much faster, more precise, and then allows the user to adjust the mask all without having to download a new plugin or create an action that the OP wants. The Quick Selection Tool is built in, and simply fantastic to work with, plus it does everything and more than the plugin can accomplish, as it gives advanced tools for refining the mask!

But, at least I see now what the OP was talking about using the Paint Brush to make selections, it just seems that the Quick Selection Tool is much better, more accurate, with more advanced masking tools!

But, that choice belongs to Redcrown, so maybe the link will help him! 😁😁
 
Tony Kuyper's plugin pre-dated the Photoshop changes, and I was testing it before release, so used to using it. Also I use other TK9 panels for masking etc., the Cx/Combo panel provides similar access to selection modification such as feather, expand, invert.
 
Last edited:
Tony Kuyper's plugin pre-dated the Photoshop changes, and I was testing it before release, so used to using it. Also I use other TK9 panels for masking etc., the Cx/Combo panel provides similar access to selection modification such as feather, expand, invert.
Yeah, I suspected that. I also do not know which version of Photoshop Redcrown is using, so he may not have the advanced Quick Selection tool. That is one of the only reasons why I keep my subscription to Photoshop, because we get the updated versions as they come out in Photoshop. Some of them, (especially the REMOVE TOOL) have been fantastic. Generative Fill (Firefly) still has a ways to go, because of the limited resolution.

Anyway, thanks again for posting that link, because it at least showed me what he was talking about, as I just had never heard of being able to use a PAINTING tool for selections.

Have a Great Day.
 
Thanks all for the replies. Please understand that my question is just for the fun of it. It's a simple PS "Action" puzzle, not a bug or a critical workflow problem. So I appreciate the advice that I shouldn't do what I'm trying to do. Sure, there are probably better ways.

The new Adobe AI remove tools are amazing. Especially for someone who has spent years cloning and healing and patching to achieve what are usually poorer results. I'm still experimenting to find best practices when making the selection for an AI remove. Should the edge be hard or soft? How far beyond the object should be selected? And so on.

The quick select and object select tools often fail me because the object I'm after is not distinct enough. So the auto select is either too much or too little, requiring lots of rework. Using a simple round brush in Quick Mask mode is good for me because I've been using it for years and have lots of practice.

So, back to the Action challenge: ChatGPT and Gemini and one private message each gave various versions of expanding then equally contracting the initial "ring" selection. That works fairly well when the object is far enough away from the image edge to avoid hitting the edge with the expand. Unfortunately, the majority of objects to be removed are near the edge. And the number of pixels to expand/contract are highly dependent on the original pixel dimensions. So, a one size fits all action with this technique seems impractical.

So, failing to find any PS Action writing gurus, I'll probably let this one drop.
 
Thanks all for the replies. Please understand that my question is just for the fun of it. It's a simple PS "Action" puzzle, not a bug or a critical workflow problem. So I appreciate the advice that I shouldn't do what I'm trying to do. Sure, there are probably better ways.

The new Adobe AI remove tools are amazing. Especially for someone who has spent years cloning and healing and patching to achieve what are usually poorer results. I'm still experimenting to find best practices when making the selection for an AI remove. Should the edge be hard or soft? How far beyond the object should be selected? And so on.

The quick select and object select tools often fail me because the object I'm after is not distinct enough. So the auto select is either too much or too little, requiring lots of rework. Using a simple round brush in Quick Mask mode is good for me because I've been using it for years and have lots of practice.

So, back to the Action challenge: ChatGPT and Gemini and one private message each gave various versions of expanding then equally contracting the initial "ring" selection. That works fairly well when the object is far enough away from the image edge to avoid hitting the edge with the expand. Unfortunately, the majority of objects to be removed are near the edge. And the number of pixels to expand/contract are highly dependent on the original pixel dimensions. So, a one-size-fits-all action with this technique seems impractical.

So, failing to find any PS Action writing gurus, I'll probably let this one drop.
Hi Redcrown

I won't pretend to understand your entire issue, yet I can give you a couple of options.

1) If you need to adjust the selection size based on the total pixel dimensions of the image, you will need a simple script that is called by the Action to change it by a percentage amount. That pixel amount can be easily calculated from the image size in the script, and it's done. ChatGPT actually does a great job of writing Photoshop scripts, if you haven't tried that.

2) There is a workaround for the edge issue. Before you start doing your selection of what you want removed, first select the entire image, reduce that selection by 1 pixel, and save that selection. Create the desired selection over the pixels you want removed and then load the saved selection in intersect mode. That removes 1 pixel from any edge pixel, and when you perform the contract, it no longer adheres to the edge.

Thought these were worth mentioning

John Wheeler
 
first select the entire image, reduce that selection by 1 pixel
Can you explain please, how you do that.
Sure I can do that @lacogada

To select the entire image, use the keyboard shortcut Cmd+A (Cntl + A on PCs)

To reduce by one pixel, you use the command Select > Modify > Contract and set the amount to "1" pixel, and also check the checkbox "Apply Effect At Canvas Bounds" per the attached image. Hope this helps

John Wheeler



e70174fda3414ad198827b646912d09d.jpg



--
John Wheeler
Never give up. Never surrender. Galaxy Quest :)
 
first select the entire image, reduce that selection by 1 pixel
Can you explain please, how you do that.
Sure I can do that @lacogada

To select the entire image, use the keyboard shortcut Cmd+A (Cntl + A on PCs)

To reduce by one pixel, you use the command Select > Modify > Contract and set the amount to "1" pixel, and also check the checkbox "Apply Effect At Canvas Bounds" per the attached image. Hope this helps
Thank you.

Was curious as my PS CS6 does not allow me to do that.

Modify - Contract is grayed out on a " select all / ctrl A " selection
 
Last edited:
Was curious as my PS CS6 does not allow me to do that.
There have also been a lot of other improvements since CS6 (2012-2013).

--
George
.
Feel free to retouch any photograph I post in these forums. It probably needs it. :)
 
Last edited:
first select the entire image, reduce that selection by 1 pixel
Can you explain please, how you do that.
Sure I can do that @lacogada

To select the entire image, use the keyboard shortcut Cmd+A (Cntl + A on PCs)

To reduce by one pixel, you use the command Select > Modify > Contract and set the amount to "1" pixel, and also check the checkbox "Apply Effect At Canvas Bounds" per the attached image. Hope this helps
Thank you.

Was curious as my PS CS6 does not allow me to do that.

Modify - Contract is grayed out on a " select all / ctrl A " selection
Did you SELECT the entire image first?? Make sure to do that FIRST, if not, the next step will indeed by grayed out. Press Command + A on a Mac, or Control A on Windows. You should see the marching ants around the entire image. THEN, go to SELECT>MODIFY>CONTRACT
 
first select the entire image, reduce that selection by 1 pixel
Can you explain please, how you do that.
Sure I can do that @lacogada

To select the entire image, use the keyboard shortcut Cmd+A (Cntl + A on PCs)

To reduce by one pixel, you use the command Select > Modify > Contract and set the amount to "1" pixel, and also check the checkbox "Apply Effect At Canvas Bounds" per the attached image. Hope this helps
Thank you.

Was curious as my PS CS6 does not allow me to do that.

Modify - Contract is grayed out on a " select all / ctrl A " selection
It's been quite a while since I have used CS6 yet I have a vague memory of that limitation in CS6. I don't have CS6 anymore to try it out, yet I think this workaround would work for you.

Start again with the Cmd+A (Cntl+A on PCs) to select the entire image. Then use Select> Modify>Border and set the pixel amount to "1" pixel. Then use Cmd + Shift + I (Cntl+Shift+I on PCs) to invert that selection. This should yield the same result as selecting the entire image and reducing it by 1 pixel.

Let me know if that works on CS6

John Wheeler
 
@gscotten
Thanks ... editing photos is a hobby, no subscription software for me.
If PS CS6 stops working will move to Affinity Photo or Photoline.
Both allow creation of actions which I use extensively.

@Major Jack
Thanks ... yes, selected image first ... Modify - Contract grayed out. Does not matter if background layer or regular layer.

@John Wheeler
Your workaround does work ... thank you !
 
@gscotten
Thanks ... editing photos is a hobby, no subscription software for me.
As it is with me. I feel happy to spend less than $10/month to get the tools I want for my hobby. Back in the day I bought PS2.6, PS5, PS7, CS3, and CS6. Cost a lot more than I am paying now. The base price for CS6 was $700 and I got the Extended version for around $1000.

If you are happy with CS6 and don't lust for the new features, your $700 purchase 13 years ago or so turned out to be a great deal. For myself, I am loving the denoise, masking, selections, and all of the rest of the new toys. Plus, Lightroom is so good that I rarely feel the need to jump into Photoshop now.
 
Was curious as my PS CS6 does not allow me to do that.

Modify - Contract is grayed out on a " select all / ctrl A " selection
It's interesting that this can be done in CS3 but not in CS6. I wonder why Adobe changed it?
No idea.

John's workaround is a simple fix though.

Can be setup as action with a pause on choosing border size.
 

Keyboard shortcuts

Back
Top