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

Colors are incorrect in screenshot #891

Open
conor-b777 opened this issue Nov 9, 2024 · 0 comments
Open

Colors are incorrect in screenshot #891

conor-b777 opened this issue Nov 9, 2024 · 0 comments

Comments

@conor-b777
Copy link

conor-b777 commented Nov 9, 2024

I'm making a small program that opens a window which contains a pyautogui.screenshot of their mouses position in a window, constantly.

In this window, the colors are incorrect, this seems to happen mainly to green and blue. This has happened on macOS and windows 10, with a viewsonic monitor and the Omen 15's display respectively.

This is my code;

import cv2
import pyautogui
import numpy

cursorpos = pyautogui.position()

while True == True:
    im = numpy.array(pyautogui.screenshot(region=((cursorpos) + (250, 250))))

    cursorpos = pyautogui.position()

    cv2.imshow("where ur cursor is", im)

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

Any help would be greatly appreciated, and apologies if my code is formatted terribly, I am a beginner to programming in general.

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

No branches or pull requests

1 participant