Python-MSS 11.0.0#
This is version 11.0.0 of Python-MSS, the ultra-fast cross-platform multiple screenshots module.
Release date: 2026-xx-x
Highlights#
API changes#
The API changes discussed in the 10.2 release notes are now implemented. (They’re not all implemented as of this writing, but should be by the time we release 11.0!)
ScreenShot attributes#
The mss.ScreenShot.raw attribute has been deprecated, and will soon be removed. Use the
mss.ScreenShot.bgra property instead.
The mss.ScreenShot.bgra and mss.ScreenShot.rgb properties now will return bytes-like
memoryview objects, rather than bytes or bytearray objects. For practical use
cases, this should not be noticeable. This change allows faster access to screenshot data, with fewer memory copies.
Immutable monitor objects#
mss.MSS.monitors now returns immutable mss.models.Monitor
objects instead of dictionaries. Monitor entries are cached
display-configuration snapshots; making them frozen and slotted prevents
application code from accidentally changing the geometry or metadata held by an
mss.MSS instance. Use attributes to read geometry and metadata:
monitor = sct.primary_monitor # or sct.monitors[1], etc.
print(monitor.left, monitor.top, monitor.width, monitor.height)
print(monitor.is_primary, monitor.name, monitor.unique_id, monitor.output)
region = monitor.as_region()
region.width -= 1
The four geometry attributes are always present. Metadata attributes are None when unavailable. String-key access
such as monitor["width"] remains temporarily available for migration, but Monitor is not a mapping: dictionary
methods, membership tests, and **monitor unpacking are not supported.
Use mss.models.Monitor.as_region() to create a mss.models.Region matching the monitor geometry. Region geometry is
available through the same left, top, width, and height attributes.
Capture regions can still be passed to mss.MSS.grab() as dictionaries or PIL-style (left, top, right, bottom)
tuples; they are converted to mss.models.Region objects internally.
Python 3.9 EOL#
Python 3.9 reached end-of-life on October 31, 2025. It is no longer receiving any updates, even security updates.
The MSS project has chosen to end support for Python 3.9, in order to focus our resources on current versions of Python.
Windows Improvements#
Improved error handling when interacting with Win32 API, which will improve diagnostics of issues.
Device contexts are now acquired and released within each grab() call, allowing monitor enumeration to work even when GetWindowDC(0) fails (#509).
Zero-Copy Screenshot Buffers (GNU/Linux, Python 3.12+)#
MSS now supports zero-copy screenshot buffers on GNU/Linux when running under Python 3.12 or later. Screenshot data can be exposed directly from operating system buffers without first being copied into a Python-owned buffer.
This removes an additional memory copy from the screenshot path and is enabled automatically with no application changes required.
In a benchmark capturing 3840×2160 screenshots as quickly as possible while forcing all pixel data to be read, processing time decreased from 22.64 ms to 18.59 ms per frame (approximately 18% faster).
Support for additional operating systems is planned.
Export Methods#
There are now convenient, easy-to-use methods to export screenshots to several popular formats: the popular PIL image library, the NumPy array format for scientific computing, and the PyTorch and TensorFlow deep learning frameworks.
Exporting to these formats was always possible from MSS, but the best way to do it hasn’t always been obvious. By providing these methods, MSS gives you tested, high-speed ways to transfer the data to these popular formats.
See the documentation section Accessing Pixel Data for details.
General Improvements#
The MSS context object will now always surface inner exceptions, even if __exit__ may also generate an exception
during tear-down.
The mss.MSS.save() method now returns a Sequence of strings, rather than an Iterator of
strings. Code that used next(sct.save(...)) should now use sct.save(...)[0] (easy to write) or
next(iter(sct.save(...))) (compatible with both old and new versions of MSS). Code using for loops or other
constructs based on Iterable (rather than Iterator) will continue to work as-is.
If mss.MSS.save() is given a template with {date} in it, the dates are now in the local time zone, instead of
UTC.
Command-line changes#
If the --output / -o flag is used with {date} fields, dates in the filename are now in the local time zone,
instead of UTC. The old behavior can be restored by setting the environment variable TZ=UTC.
When invoked from the command line, the --coordinates flag can specify coordinates in the format traditionally used by
X11: WIDTHxHEIGHT+LEFT+TOP. Additionally, whether using comma-style or X-style coordinates, a negative left or top can
be used to specify insets from the right or bottom edge of the specified monitor.