Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ImageGrab usually is not truncating a single display. With bbox omitted, Pillow documents that ImageGrab.grab() captures the entire screen available to that platform path. “Whole screen” can mean the primary display, every monitor in a Windows virtual desktop, or a Retina display’s logical points versus physical pixels. Check your operating system, Pillow version, capture arguments, display session and returned image.size before changing code.

Start with a diagnostic capture

Run this small program and keep its output with any error message. It distinguishes a wrong interpretation of dimensions from a failed capture.

import os
import platform
import PIL
from PIL import ImageGrab

print("Python platform:", platform.platform())
print("Pillow:", PIL.__version__)
print("DISPLAY:", os.environ.get("DISPLAY"))
print("WAYLAND_DISPLAY:", os.environ.get("WAYLAND_DISPLAY"))

image = ImageGrab.grab()
print("Image mode:", image.mode)
print("Image size in pixels:", image.size)
image.save("screen-test.png")
  • Record the exact grab() arguments, not just the exception text.
  • Compare the returned width and height with the coordinate system you intend to use.
  • Decide whether “whole” means one display or all connected monitors.

The correct fix depends on that answer. A large Retina image, a Windows capture containing a monitor positioned to the left, and a Linux process with no usable X11 display are different problems.

Windows: capture every monitor with all_screens=True

Why the default appears incomplete

On Windows, all_screens defaults to False. The default capture therefore targets the primary screen rather than the complete multi-monitor virtual desktop. The option is Windows-only and was added in Pillow 6.2.0.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Working all-monitor example

from PIL import ImageGrab

image = ImageGrab.grab(all_screens=True)
print(image.size)
image.save("all-monitors.png")

With multiple displays enabled, Windows’ virtual desktop can begin at a negative coordinate. For example, a monitor placed left of the primary display may occupy negative X positions. The image still has a normal pixel size, but its logical origin is not necessarily (0, 0) at the primary monitor.

Make crops in the virtual-desktop coordinate space

If you pass a bbox, use coordinates that match the desktop arrangement represented by the capture. A crop written only for primary-monitor coordinates can select the wrong monitor or look clipped when the virtual origin is negative.

from PIL import ImageGrab

# Replace these values with coordinates from your Windows display layout.
bbox = (-1920, 0, 0, 1080)
image = ImageGrab.grab(all_screens=True, bbox=bbox)
print(image.size)
image.save("left-monitor.png")

The example is only a coordinate illustration; measure your own monitor arrangement before hard-coding a box. First capture without bbox, inspect the complete result, and then define a crop.

Do not confuse layered windows with monitors

include_layered_windows=True is a separate Windows-only setting. It controls whether layered windows are included; it does not enable multi-monitor capture. Use it only when the missing content is a layered window, and combine it with all_screens=True only when you need both behaviors.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

macOS: Retina pixels are not a cropped screen

Understand points versus pixels

Pillow documents 2x pixel capture on a Retina display. A display described by macOS as 1440 points wide can therefore produce an image 2880 pixels wide. That apparent mismatch is scaling, not proof that ImageGrab cut off the right side.

from PIL import ImageGrab

image = ImageGrab.grab()
print("Captured pixels:", image.size)

Compare the result with the display’s physical pixel dimensions and with the logical point dimensions reported by macOS. Use the pixel dimensions when processing or saving the bitmap.

Request a 1x result when your pipeline needs it

scale_down=True requests 1x output. It is a keyword-only option added in Pillow 12.3.0, so check the installed version before using it.

from PIL import ImageGrab

image = ImageGrab.grab(scale_down=True)  # Pillow 12.3.0+
print("1x pixels:", image.size)
image.save("screen-1x.png")

On an older Pillow release, upgrade before relying on this keyword or omit it and handle the 2x bitmap in your own resizing step.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Grant the launching application screen access

macOS manages capture permission per application under System Settings → Privacy & Security → Screen & System Audio Recording. Enable the application that actually launches Python: Terminal, an IDE, a task runner or another host may each appear separately. After changing access, restart the launching application and run the test again.

Linux: verify XCB, display access and the documented fallback

Check whether Pillow has XCB support

Pillow’s Linux capture path uses X11 through XCB. Test the feature in the same environment that runs your script:

from PIL import Image, ImageGrab

print("XCB available:", Image.features.check_feature("xcb"))
image = ImageGrab.grab()
print(image.size)
image.save("linux-screen.png")

A false result indicates that this Pillow build does not have the documented XCB feature available. A true result does not guarantee access to the active display; the process still needs a usable display connection.

Know when Pillow tries a utility

When xdisplay=None and the default X11 capture does not return a snapshot, Pillow documents a fallback attempt using an installed gnome-screenshot, grim or spectacle utility. Pillow 11.3.0 added this fallback support.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

That behavior is conditional. It does not mean that installing an arbitrary screenshot package fixes every Linux session, and different display-server configurations can behave differently. Record your desktop session, display variables, Pillow version and which named utility is installed before changing dependencies.

Do not disable the fallback accidentally

Passing xdisplay="" disables the utility fallback. Use that value only when you intentionally want to test the direct capture path. For ordinary troubleshooting, start with the default xdisplay=None.

How bbox changes the meaning of “whole screen”

Omitting bbox asks Pillow for the complete screen defined by the platform implementation. Supplying a box changes the request to a region. A box that is valid for one monitor layout may be invalid after rearranging displays, changing scaling, or moving a monitor to the other side of the primary display.

  • Capture without bbox to establish the full returned image.
  • Print image.size and inspect the saved image before designing a crop.
  • On Windows with all_screens=True, account for negative virtual-desktop coordinates.
  • On Retina macOS, distinguish logical points from physical pixels before calculating a box.

A platform-by-platform troubleshooting sequence

  1. Collect facts. Record PIL.__version__, operating system, desktop or display session, exact arguments, exception text and image.size.
  2. Define the target. Decide whether you need the primary display, one named monitor or every connected monitor.
  3. Apply the platform fix. Use all_screens=True on Windows; evaluate Retina scaling and scale_down=True on macOS; check XCB and display access on Linux.
  4. Remove cropping variables. Temporarily omit bbox, xdisplay overrides and other optional flags.
  5. Check permissions and session access. On macOS, authorize the process-launching app. On Linux, verify that the process can reach the active X11 display.
  6. Retest with a saved file. Open the output independently of your viewer or downstream conversion code.

Common symptoms and precise fixes

Symptom Most relevant check Fix
Only the primary Windows monitor appears all_screens is omitted or false Use ImageGrab.grab(all_screens=True); recalculate crops in virtual-desktop coordinates.
A Windows crop is shifted or clipped Monitor is positioned at a negative coordinate Use the complete virtual-desktop coordinate space rather than primary-monitor-only coordinates.
macOS image is about twice the expected dimensions Retina display scaling Treat the result as 2x pixels or use scale_down=True with Pillow 12.3.0 or newer.
macOS capture is blank or denied Permission belongs to a different launching app Enable that Terminal, IDE or runner in Screen & System Audio Recording, restart it and retry.
Linux raises an error or returns no usable image XCB feature, display access or fallback utility Check Image.features.check_feature("xcb"), session access and the documented GNOME Screenshot, grim or Spectacle fallback conditions.
Adding xdisplay="" made Linux worse Fallback was disabled Return to the default xdisplay=None unless direct-path testing is intentional.
Layered content is missing on Windows Layered-window inclusion, not monitor selection Evaluate include_layered_windows=True separately from all_screens=True.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Reliability and performance considerations

A full multi-monitor or 2x Retina bitmap consumes more memory and takes longer to encode than a single-display crop. Save a lossless PNG while diagnosing dimensions; switch to JPEG or another format only when the downstream size-versus-quality trade-off is understood. Avoid repeatedly capturing a full desktop when an application region is sufficient, but do not add a bbox until you have verified the coordinate origin.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

For unattended jobs, log the platform, Pillow version, arguments, output dimensions and exception text. Display layouts, privacy settings and Linux session types are machine-specific, so a script that works interactively may need an explicit environment and permission configuration when launched by a service.

Or skip the browser setup

If the thing you need is a screenshot of a web page rather than the operating-system desktop, ScreenshotNeo avoids local browser and display-server setup. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients.

One GET request is enough:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo documentation for authentication, capture options and response headers. The same endpoint is available from Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Or Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Every feature is available on every plan. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for the free ScreenshotNeo plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.