Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masked Image Searches #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jjunkergamedev
Copy link

Added support for using image masks to control which pixels on the needle image are searched for.

New parameters:
maskImage - Image name or object of the image to use as a mask. Must be equal to or larger than needleImage. May be the same as needleImage.
maskChannel - Index (0 through 3) of the color channel to use from the mask image. If no maskImage is specified, specifying a maskChannel will cause the needleImage to be used as the maskImage. So to search for just the visible portions of an RGBA image, set maskChannel=3.

@asweigart This is actually my first attempted contribution to an open source project so let me know if there is anything I'm missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant