Page 1 of 1

Mask creation feature request

Posted: July 12th, 2025, 12:53 pm
by johnp
Maybe there's another way to do this, but....

While creating a mask, it would be nice to be able to define a keep-out or keep-in area that a tool, such as flood fill, would be restricted to work within. For example, when using 'color range,' I might want to apply a certain setting to only one portion of the image.

This keep-out / keep-in idea may be applicable to transforms other than masking.

Thoughts or suggestions?

Thanks!

John P

Re: Mask creation feature request

Posted: July 12th, 2025, 2:36 pm
by jsachs
Setting aside flood fill which has some other issues, you should be able to accomplish this using the Overlap mask mode. For example, to restrict a mask to a certain area of the input image, first create a mask for this region, perhaps using the freehand outline tool. Next, switch the mode to Overlap and then apply your next mask tool. In Overlap mode, only pixels that are in both masks make it to the result mask, i.e. the area where the two masks overlap.

The overlap feature works, even with masks that are less than 100% -- I don't have time to test this now but I assume flood fill will create a mask that goes potentially to the entire image but in overlap mode this mask is clipped to the previous mask. This is not quite the same as preventing flood fill from exploring areas outside the previous mask, but it is not clear how this would work if the mask was less than 100%.

Re: Mask creation feature request

Posted: July 13th, 2025, 8:56 am
by johnp
I'm don't think the overlap will work for my use case.

Assume I have do a serious of mask creation operations already. To use overlap, I need to change what I already have by drawing the keep-out area into the current mask - this would destroy work I have already done in the 'keep-in' area that I want to tweak.

John P

Re: Mask creation feature request

Posted: July 17th, 2025, 3:25 am
by jsachs
Maybe I am not understanding your suggestion. Overlap does not destroy any previous operations -- you can either start with the keep in/out mask and add other operations in overlap mode or you can do the operations first and then add the keep in/out mask in overlap mode.

Re: Mask creation feature request

Posted: July 17th, 2025, 12:10 pm
by johnp
Maybe I don't understand the overlap operation. From the doc, I see:

"Clears the parts of the current mask that do not overlap the new mask. Use this mode when you want to create a mask based on two conditions being met simultaneously, for example, to create a mask consisting of all pixels in a certain region with colors in a certain range."

I don't want to clear areas, I want to protect areas. Here's an example of the flow...

1) Open the Masks transform and start a new mask.
2) Do a transform to select a certain range of colors. This potentially affects the entire new mask since it looks at the whole input image.
3) Tweak the mask with more operations, such as spline, freehand, or anything else.
4) do some more operations
5) now I want to do something like a flood fill or a 'color range', but I want to restrict it to a certain area. I don't want it to have global impact.

As an example of what I'm doing, I have a picture of a Queens Ann's Lace flower that I want to have a pure black background. To create a mask to separate flower from background requires a bunch of steps to make the mask. Since a lot of the internal colors of the flower can be fairly similar to other parts of the image, trying to use 'color range' will impact the entire mask. It would be nice to have a keep out type are to restrict the operation to a local are, ie, the inside of the flower. It looks to me like the 'overlap' option clears areas of the mask whereas I want to preserve them.

Am I missing something in the way overlap works?

Thanks!

John P