What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

For a straightforward still image, start with Pillow’s ImageGrab.grab(). It returns a Pillow image, supports full-screen and rectangular captures, and can save directly to PNG or another format. Use MSS when you need explicit monitor selection or fast access to pixel buffers, and use PyAutoGUI when screenshots are one step in a mouse-and-keyboard automation workflow. Your operating system matters: macOS requires screen-recording permission, Windows provides a native display/window capture API, and Wayland normally requires the desktop portal and PipeWire rather than unrestricted X11 access.

Install the Python libraries

Create an isolated environment, then install only the library that matches your workflow:

python -m venv .venv
# macOS/Linux
source .venv/bin/activate
# Windows PowerShell: .venvScriptsActivate.ps1
python -m pip install --upgrade pip
python -m pip install Pillow mss pyautogui

You do not need all three packages. Pillow provides the simplest image API; MSS provides monitor metadata and raw pixels; PyAutoGUI couples capture with UI automation. On Linux, PyAutoGUI’s documented screenshot path requires Pillow and the scrot utility; install the package supplied by your distribution and verify the requirements for your installed PyAutoGUI/PyScreeze versions.

Capture a full screen or region with Pillow

ImageGrab.grab() returns a Pillow image. Without bbox, it captures the available screen; with bbox=(left, top, right, bottom), it captures that rectangle. The coordinates are desktop coordinates, so confirm them on the target machine before hard-coding them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Guermok Video Capture Card, 4K USB3.0 HDMI to USB C, 1080P 60FPS & 2K 30FPS
  • 【1080P 60FPS Video Capture Card】 This HDMI game capture card is based on USB3.0 high speed transmission port, input resolution up to 4K@30HZ, output resolution up to 2K@30Hz or 1920×1080@60Hz. Type c and USB interface can meet most of the devices in daily life. Easily meet the online capture, real-time recording, online meetings, live gaming and other functions, so you have a better visual enjoyment. Note: For capture use only; requires capture software to function and is not intended for direct screen casting to a monitor or TV
  • 【Ultra Low Latency Screen Sharing】 HDMI capture card is made of good quality aluminum alloy with strong heat dissipation, allowing you to enjoy ultra low latency while live gaming or video recording or live streaming, avoiding blue screens and lag. This HDMI to USBC capture card supports easy recording of good quality audio or HD video and transferring it to your computer or streaming platform, allowing you to record 60 fps HD video directly on your hard drive and real-time preview
  • 【Plug and Play, Easy to Carry】 This HDMI 1080P video capture card does not require any additional drivers or external power supply, just plug and play for fast capture. The capture card is small and lightweight, so you can put it in your bag for emergencies, making it very portable for outdoor live streaming. It's also a great way to share content in game recording, video conference, video recorder and online teaching
  • 【Wide Compatibility USB Capture Card】 Easily streams to Facebook, Youtube or Twitch. With the connection, this HDMI to USB C/3.0 video capture devices can be working on several Operating Systems and various software: Windows 7/ 8/ 10, Mac OS or above, Linux, Android, Laptop, Xbox One, PS3/PS4/PS5, Camera, DVDs, Set Top Box, Webcame, DSLR, Switch/Switch 2, TV BOX, HDTV, Potplayer/VLC, ZOOM, OBS Studio etc.
  • 【Package Content & Note】 1x HD Audio Capture Card , 1x USB 3.0 to USB C Adapter (A-side 3.0, B-side 2.0), 1x user manual. Please note that you need to restart the OBS Studio software after the audio setup is complete, otherwise it will result in no sound output. When using an adapter, if the device is recognized as USB 2.0, try using the other side with the USB-C port. Simply flip the capture card and reconnect it to be recognized as USB 3.0
from PIL import ImageGrab

image = ImageGrab.grab()
image.save("screenshot.png")

region = ImageGrab.grab(bbox=(10, 20, 410, 320))
region.save("region.png")

Pillow documents RGBA output on macOS and RGB elsewhere. Retina displays can return twice the logical dimensions; pass scale_down=True when you need a 1x result (check the installed Pillow version’s signature). Inspect rather than assume:

print(image.mode, image.size)

Capture a window

Current Pillow documentation supports a window argument containing an HWND on Windows or a CGWindowID on macOS. This parameter was added in newer releases—Windows support is documented as added in Pillow 11.2.1 and macOS support in 12.1.0—so gate your code on the Pillow version you deploy and obtain the native window identifier using an OS-specific integration. A window identifier is not a title string, and a window that is minimized, occluded, or protected may still produce an unavailable or incomplete image.

Linux display limitations

Pillow documents X11 capture. In some cases it falls back to gnome-screenshot, grim, or spectacle when the default X11 display does not produce a snapshot. That fallback is not a guarantee of Wayland compatibility. Identify whether the session is X11 or Wayland before diagnosing a blank image or display error.

Use MSS for monitor selection and pixel data

MSS exposes monitor definitions and region capture. Its current documentation recommends the MSS import; the older mss.mss() spelling is deprecated.

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.
from mss import MSS

with MSS() as sct:
    print(sct.monitors)          # monitor 0 is the virtual desktop; others are individual monitors
    shot = sct.grab(sct.primary_monitor)
    shot.to_pil().save("primary.png")
    pixels = shot.bgra              # raw BGRA bytes

To capture a defined rectangle, provide a monitor-style mapping:

from mss import MSS

area = {"left": 100, "top": 100, "width": 800, "height": 600}
with MSS() as sct:
    shot = sct.grab(area)
    image = shot.to_pil()
    image.save("area.png")

Use sct.monitors instead of guessing coordinates when users can move displays or change scaling. MSS’s screenshot object gives direct pixel access for computer-vision pipelines; convert to Pillow only when you need Pillow transforms or file encoders. Do not assume a universal speed advantage: benchmark your resolution, capture frequency, operating system, and display backend. The project’s documentation describes relative performance for one Linux backend, not a general benchmark against every library.

Rank #2
Capture Card, 4K HDMI Video Capture Card, Game Capture Card, 1080P 60FPS Video Capture Device, HDMI to USB 3.0 Capture Card for Streaming, Work with Camera/Xbox/PS4/PS5/PC/OBS
  • 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
  • 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
  • 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
  • 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
  • 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.

Use PyAutoGUI during visual automation

PyAutoGUI’s screenshot functions return Pillow images and can save to a filename. This is convenient when the same script clicks, types, locates images, and captures evidence:

import pyautogui

image = pyautogui.screenshot()
image.save("automation-state.png")

region = pyautogui.screenshot(region=(0, 0, 800, 600))
region.save("top-left.png")

Choose PyAutoGUI for integration with its automation API, not on an assumption that it is the fastest capture route. Its screenshot documentation is older, so test the behavior and dependencies of the versions installed in your environment.

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

Choose the API that fits the capture

Need Start with Important qualification
One still image to edit or save with Pillow Pillow ImageGrab.grab() Check image mode, Retina scaling, coordinates, and Linux backend.
Specific monitor, rectangle, or raw pixels MSS Validate the display backend and deployment environment.
Screenshot plus mouse, keyboard, or image-location automation PyAutoGUI Linux requires its documented screenshot dependencies; verify installed versions.
Native macOS display, app, or window capture ScreenCaptureKit Permission and an application bridge are required; a Python binding is a separate choice.
Native Windows display or app-window capture Windows.Graphics.Capture Microsoft’s cited example is C#; Python interop and packaging need their own verification.
Wayland desktop capture Portal-backed API with PipeWire The desktop presents an operating-system source-selection wizard.

Platform permissions and APIs

macOS

ScreenCaptureKit supports displays, applications, windows, still images, and streams. Apple requires a permission request and documents the NSScreenCaptureUsageDescription information property. A Python call can therefore fail or prompt depending on the permission state and the identity of the Python runtime or packaged application. Grant access in System Settings, then retest the exact executable used in production.

For a simple script, Pillow may be enough after permission is granted. For native app/window selection or controlled streams, use ScreenCaptureKit through an appropriate Python bridge and implement its permission flow.

Windows

Microsoft’s Windows.Graphics.Capture API acquires frames from a display or application window and includes a user picker. The official example is written in C#, so do not treat it as a ready-made Python recipe. Pillow’s window option can be simpler for still captures when you already have an HWND; otherwise use a maintained Python-to-Windows interop layer and test packaging, window handles, and permission behavior.

Linux: X11 versus Wayland

X11-oriented libraries can work when the process has access to the display. Wayland intentionally restricts arbitrary screen reads. Qt for Python documents the supported route as an XDG Desktop Portal ScreenCast service backed by PipeWire; the operating system then opens a selection wizard. If a Wayland capture is blank or denied, check the compositor, portal service, PipeWire, and the user’s selection rather than repeatedly changing Python coordinates.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Video Capture Card, 4K USB3.0 HDMI to USB C, 1080P60FPS HDMI Capture Card for Streaming, Gaming, Video Recording Compatible with Switch, Xbox, PS4/5, OBS,iPad Mac OS Windows,Camera, Zoom(Silver)
  • 【4K HDMI Input, 2K@30Hz Recording】Powered by a true USB 3.0 high-speed interface, the capture card supports up to 4K@30Hz HDMI input and records at 2K@30Hz or 1080P@60Hz. Perfect for gamers, streamers, and professionals who need crisp, smooth video for live streaming, gameplay recording, or online meetings.
  • 【Ultra Low Latency Screen Sharing】Built with a premium aluminum alloy shell and advanced chipset for stable heat dissipation, ensuring ultra-low latency transmission. Capture high-quality video and dual-channel audio in real time—no lag, no frame drop—ideal for Twitch, YouTube, or OBS streaming.
  • 【Easy Plug and Play, Compact & Portable】No driver or external power required—just plug and play via USB 3.0 or Type-C connection to your Windows or macOS computer. Lightweight and compact design makes it easy to carry for outdoor streaming, live shows, or mobile recording setups.
  • 【Wide Compatibility & Multi-Device Support】Compatible with Windows 7 8 10 11, macOS, Linux,Android and supports most popular software such as OBS, Zoom, VLC, Twitch Studio, and more. Works seamlessly with PS4, PS5, Xbox, Switch, DSLR cameras, TV boxes, and other HDMI-output devices for streaming to YouTube, Twitch, etc.
  • 【What You Get】Includes: HDMI Capture Card, USB 3.0 to USB-C Adapter, User Manual. Tips: Make sure your tablet’s OTG function is enabled before connecting. Test your HDMI device with a monitor first to confirm video and audio output, then connect to the Video Capture Card for recording.

Reliable capture patterns

Validate dimensions and mode

Log image.size and image.mode on startup. Multi-monitor origins can be negative, and display scaling can make logical coordinates differ from physical pixels. Keep geometry configurable instead of embedding one developer’s monitor layout.

Capture after the UI is ready

Screenshot libraries capture the current desktop, not a future application state. In automation, wait for the target window, move the pointer away from the area of interest, and add an application-level readiness check before calling the screenshot function. For repeated captures, close images or release buffers promptly and write files off the critical interaction path.

Package dependencies explicitly

Pin and test Pillow, MSS, PyAutoGUI/PyScreeze, and any native utilities in the same operating-system images used in deployment. A script that works under an interactive desktop account may fail in a service, SSH session, CI runner, container, or sandbox with no display server.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

Permission denied or a black macOS image

Grant Screen Recording access to the actual Python interpreter or packaged app, confirm NSScreenCaptureUsageDescription for native ScreenCaptureKit apps, restart the process, and test again. Different virtual environments can have different executable identities.

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

Blank image on Linux

Check $XDG_SESSION_TYPE. On X11, verify $DISPLAY and the user’s access to that display. On Wayland, use the desktop portal and PipeWire flow; an X11-only fallback is not a Wayland solution.

PyAutoGUI reports a missing screenshot backend

Install Pillow and the Linux screenshot dependency documented for your distribution, then verify the installed PyAutoGUI and PyScreeze versions. Run the script in a graphical session rather than a headless terminal.

Rank #4
Capture Card, USB Video Capture Card Device, Audio Video Converter Grabber for RCA to USB-Convert VHS Mini DV VCR Hi8 DVD to Digital, for PC TV Tape Player Camcorder, MAC Windows Vista Compatible
  • AV TO USB Converter: Capture videos and audios from VHS, VCR, Hi8, DV tapes to a PC, with the help of our USB Video Converter. Save room while digitizing your favorite old memories
  • Quality Capture Card: Our USB Video Capture Card converting anolog RCA composite input into HD 720P USB output and capturing audio without any sound card. Advanced signal processing technology provides you with great precision, colors, resolutions, and details.
  • Plug and Play: Automatically install the driver once you hook up this RCA to USB Converter to a PC. No external power is needed. User-friendly and easy to operate
  • Wide Compatibility: The Video Capture Card can work with video devices with RCA connector or S-Video connector, such as VHS, VCR, Hi8, camcorder, compatible with Windows and Mac OS. Support video formats like NTSC, PAL, and support brightness, contrast, hue, and saturation control
  • Note: The Video Converter is used with acquisition software. We recommend OBS Studio or PotPlayer for Windows, and QuickTime Player for Mac. They can be downloaded for free online. Please operate according to the steps in User Manual or contact us if you have any questions

The region is shifted or the size is unexpected

Print monitor metadata and image dimensions. Account for negative monitor coordinates, OS display scaling, Retina 2x output, taskbars, and window borders. Use MSS monitor records or an OS window API instead of guessing.

A window capture is unavailable

Confirm that your Pillow version includes the relevant window support, that the identifier is an HWND or CGWindowID rather than a title, and that the window is not minimized or protected. For richer native selection, use the platform API.

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

Or skip the browser setup

If what you actually need is a screenshot of a web URL rather than the local desktop, ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP, or PDF; it handles browser setup on the service side.

cURL:

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

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)

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}`);

See the ScreenshotNeo API documentation for parameters. Before capture, it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

Frequently asked questions

Can Python capture a screenshot without saving a file first?

Yes. Pillow and PyAutoGUI return Pillow image objects, while MSS returns a screenshot object with raw pixel properties; save only when your workflow needs a file.

Which library captures a specific monitor?

MSS is the clearest starting point because it enumerates monitors and accepts monitor or region specifications. Platform-native APIs are preferable when you need OS-level window or display selection.

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

Is a screenshot API the same as a desktop capture API?

No. Desktop libraries read the screen attached to the Python process. A website screenshot API renders a URL remotely and is suited to web pages, PDFs, and server-side jobs.

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.