Skip to content

How to turn scaling off? Screen grab always has scaling with factor 2 applied #257

@orange-puff

Description

@orange-puff

General information:

  • OS name: macOS Big Sur

  • OS version: 11.1

  • OS architecture: 64 bits

  • Resolutions:

    • Monitor 1: 2560x1600
  • Python version: 3.10.7

  • MSS version: 9.0.1

Description

When I run the following code:

import pyautogui
import mss

w, h = pyautogui.size()
with mss.mss() as sct:
    monitor = {"top": 0, "left": 0, "width": w, "height": h}
    mss_image = sct.grab(monitor)
    print(f'({w}, {h}) ({mss_image.width}, {mss_image.height})')

it results in
(1440, 900) (2880, 1800)

This interferes with my ability to then use pyautogui to find certain pixels with a given color and click them. Is there a way to turn scaling off in mss, or is this perhaps a macOS issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions