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

Need Help #167

Closed
Baquant opened this issue May 1, 2020 · 1 comment
Closed

Need Help #167

Baquant opened this issue May 1, 2020 · 1 comment
Labels

Comments

@Baquant
Copy link

Baquant commented May 1, 2020

General information:

  • Monitor 1: _2540,1440
  • Python version: 3.6.4
  • MSS version: 3.2.0

can i change this code to mss for faster usage. ( i couldn't)

def imageGrabv1():
    global b1
    global b2
    global b3
    global b4
    global b5
    global b6
    global x
    box1 = (995, 509, 1088, 510)
    box2 = (1088, 509, 1181, 510)
    box3 = (1181, 509, 1263, 510)
    box4 = (1263, 509, 1368, 510)
    box5 = (1368, 509, 1461, 510)
    box6 = (1461, 509, 1560, 510)
    image1 = ImageGrab.grab(box1)
    image2 = ImageGrab.grab(box2)
    image3 = ImageGrab.grab(box3)
    image4 = ImageGrab.grab(box4)
    image5 = ImageGrab.grab(box5)
    image6 = ImageGrab.grab(box6)
    grayscale1 = ImageOps.grayscale(image1)
    grayscale2 = ImageOps.grayscale(image2)
    grayscale3 = ImageOps.grayscale(image3)
    grayscale4 = ImageOps.grayscale(image4)
    grayscale5 = ImageOps.grayscale(image5)
    grayscale6 = ImageOps.grayscale(image6)
    b1 = array(grayscale1.getcolors())
    b2 = array(grayscale2.getcolors())
    b3 = array(grayscale3.getcolors())
    b4 = array(grayscale4.getcolors())
    b5 = array(grayscale5.getcolors())
    b6 = array(grayscale6.getcolors())

and what can i use instead of using sum()

@BoboTiG
Copy link
Owner

BoboTiG commented May 1, 2020

Hello,

This is not a help forum, you should ask on StackOverflow instead.

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

No branches or pull requests

2 participants