Comments (5)
Then use the locate function from the documentation:
locate(needleImage, haystackImage, grayscale=False)
Returns (left, top, width, height) coordinate of first found instance of needleImage in haystackImage. Returns None if not found on the screen.
from pyscreeze.
@deepio I used it and then
from pyscreeze.
Maybe this is lost in translation? That error says the small image you're looking for is in fact bigger than the large image that's supposed to contain it. Check your image dimensions again.
from pyscreeze.
@deepio Sorry, it suddenly occurred to me that the first one in the front is the little picture, and the second one is the big picture.It was successful
from pyscreeze.
@XDSwang problem solved, you can close the issue now. Or @asweigart you can probably close this issue too.
from pyscreeze.
Related Issues (20)
- Support for async
- TypeError: '<' not supported between instances of 'str' and 'int' HOT 3
- pyscreeze.screenshot makes a full desktop screenshot instead of region HOT 3
- One color images are always located at (0, 0)
- where is 0.1.30? HOT 1
- `_screenshot_win32` on PyPI contains more arguments than on master
- Issue with pyscreeze version 0.1.30 - ImageNotFoundException HOT 5
- CHANGES.txt missing in tarball
- In method [_screenshot_xxx ]; Use param[region] error, causing larger screenshots HOT 1
- Linux saves image before checking if region is set
- Location `Box()` that `locate` functions return don't quite describe the `region` the image was found at.
- Type hints HOT 1
- [QUESTION/BUG] Wrong point found with specific needle on haystack
- TypeError: '>' not supported between instances of 'float' and 'tuple' HOT 1
- Wrong "click" example from README? HOT 1
- Screenshot multiple monitors offset
- (macosx) FileNotFoundError: [Errno 2] No such file or directory: "screenshot...'
- pyautogui.screenshot() method is not working on Mac OS 13.2.1 HOT 4
- Bug in opencv `locateAll`
- Pillow version check on Mac OS fails. Suggesting fix. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyscreeze.