@@ -9,11 +9,14 @@ or the clipboard to a PIL image memory.
99
1010.. versionadded :: 1.1.3
1111
12- .. py :function :: grab(bbox = None , include_layered_windows = False , all_screens = False , xdisplay = None , window = None )
12+ .. py :function :: grab(bbox = None , include_layered_windows = False , all_screens = False , xdisplay = None , window = None , scale_down = False )
1313
1414 Take a snapshot of the screen. The pixels inside the bounding box are returned as
15- an "RGBA" on macOS, or an "RGB" image otherwise. If the bounding box is omitted,
16- the entire screen is copied, and on macOS, it will be at 2x if on a Retina screen.
15+ "RGBA" on macOS, or "RGB" image otherwise. If the bounding box is omitted,
16+ the entire screen is copied.
17+
18+ On macOS, it will be at 2x if on a Retina screen. If this is not desired, pass
19+ ``scale_down=True ``.
1720
1821 On Linux, if ``xdisplay `` is ``None `` and the default X11 display does not return
1922 a snapshot of the screen, ``gnome-screenshot ``, ``grim `` or ``spectacle `` will be
@@ -25,8 +28,8 @@ or the clipboard to a PIL image memory.
2528 .. versionadded :: 7.1.0 Linux support
2629
2730 :param bbox: What region to copy. Default is the entire screen.
28- On macOS, this is not increased to 2x for Retina screens, so the full
29- width of a Retina screen would be 1440 , not 2880 .
31+ On macOS, this is increased to 2x for Retina screens, so the full
32+ width of a Retina screen would be 2880 , not 1440 .
3033 On Windows, the top-left point may be negative if ``all_screens=True ``
3134 is used.
3235 :param include_layered_windows: Includes layered windows. Windows OS only.
@@ -47,6 +50,11 @@ or the clipboard to a PIL image memory.
4750 HWND, to capture a single window. Windows only.
4851
4952 .. versionadded :: 11.2.1
53+
54+ :param scale_down: On macOS, Retina screens will provide images at 2x size by default. This will prevent that, and scale down to 1x.
55+ Keyword-only argument.
56+
57+ .. versionadded :: 12.1.0
5058 :return: An image
5159
5260.. py :function :: grabclipboard()
0 commit comments