NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2679 most downloaded on PyPI
An ultra fast cross-platform multiple screenshots module in pure python using ctypes.
Last release 5 months ago
23 Apr 2026
Release timing varies
gaps range from 9 days to 2.0 years
Nearly every release is documented
notes for 41 of 44 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
44 releases · first in 2013
The existing `mss.{platform}.MSS` types are deprecated in 10.2.0. (This means the mss.darwin.MSS, mss.linux.MSS, and mss.windows.MSS classes.) They wi…
❤️ Big shout out to @jholveck and @halldorfannar for this huge release. It will pave a brighter future for the project. Warm thank you to both of you.
This is version 10.2.0 of Python-MSS, the ultra-fast cross-platform multiple screenshots module.
Release date: 2026-04-23
This release lays the groundwork for upcoming improvements planned for MSS 11.0, while remaining fully backward-compatible. It also improves performance, reliability, and multithreaded behavior, and introduces several new features for working with multi-monitor systems.
If your code works with previous versions of MSS, it should continue to work unchanged in 10.2.0.
In 10.2, MSS introduces a new API. The new design lets the MSS project introduce more significant internal changes, without introducing compatibility problems.
Programs using the old API will continue to work in 10.2.0, and most of them will continue to work with 11.0 and beyond.
Previously, MSS would provide the user with an OS-specific MSS class. In the new API, the user always sees a single class: mss.MSS.
The existing mss.mss factory function will continue to work in 11.0, and will continue to work for as long as is reasonable. However, the mss.MSS constructor is preferred for new code.
The existing mss.{platform}.MSS types are deprecated in 10.2.0. (This means the mss.darwin.MSS, mss.linux.MSS, and mss.windows.MSS classes.) They will continue to work. In 11.0, MSS will remove these classes, but to help with backwards compatibility, they will become deprecated factory functions, returning an instance of mss.MSS. Users who use mss.{platform}.MSS as functions can continue to do so. Users who use these as type declarations may update their code to use mss.MSS in 10.2, and may be required to do so in 11.0.
Speaking of types, the MSSBase class is deprecated in 10.2.0. Most users won’t care about that, some type declarations may need to change to mss.MSS.
Where possible, deprecated functionality emits a DeprecationWarning. However, note that these are ignored by default, unless triggered by code in __main__. If you want to see these DeprecationWarning messages, you may run your program under python -Wd, or with the environment variable PYTHONWARNINGS=default (or error). See the Python documentation chapter “Warning Control” for more details.
Many of the API docs are removed, since this change removes much of the API surface. However, they are still in available for backwards-compatibility.
Again, existing working code will continue to work in 10.2 unchanged. However, we recommend that users change the code and type declarations to use mss.MSS.
Summary of deprecations:
mss.mss: Change to mss.MSS. Will continue to work in 11.0.mss.{platform}.MSS: Change to mss.MSS. Code will continue to work in 11.0. Types will need to be changed by 11.0.mss.base.MSSBase: (Only valid as a type) Change to mss.MSS by 11.0.With this change, we are also documenting the MSS versioning policy. MSS has always used Semantic Versioning, but the new policy clearly spells out the details.
The repository now includes several full demo programs under demos/ showing common screenshot-processing workflows built on MSS.
These examples are intended as learning resources and reference implementations. The demos include extensive comments explaining the pipeline architecture and performance considerations involved in real-world screenshot processing, as well as how to use MSS with several popular libraries.
Included demos:
Records the screen to a video file using MSS frames.
Streams the screen as MJPEG to a TinyTV device.
Demonstrates real-time computer vision by detecting cats appearing on the screen.
While playful, these examples illustrate techniques for:
If you currently use sct.monitors[1] to select the primary display, you may prefer the new sct.primary_monitor property.
Monitor dictionaries now include additional metadata to help applications identify displays reliably:
is_primary — whether this monitor is the primary displayname — human-readable device nameunique_id — stable identifier for the displayThese values make it easier to:
These new values are only present if they can be detected. In some cases (such as with a very old monitor), they may not be available.
A new convenience property has also been added:
sct.primary_monitor
This returns the monitor dictionary corresponding to the system’s primary display.
Currently available on:
Support for macOS will be added in the future.
Multithreaded usage of MSS has been improved and clarified.
In 10.2.0:
MSS instance can safely be passed between threadsgrab() on the same MSS instance remain serialized, but are now guaranteed to be safeMSS instances can capture concurrently, allowing parallel capture across threadsPreviously, some internal locking effectively serialized capture across all MSS usage. In 10.2.0, locking is now per instance, allowing independent MSS objects to perform captures simultaneously.
The documentation has also been expanded to describe MSS’s supported multithreading guarantees.
On Linux, the new XCB-based backend further improves the reliability of multithreaded usage compared to the previous Xlib-based implementation.
The Linux capture implementation has been significantly modernized to reduce capture overhead and improve multithreaded reliability.
MSS now includes an XCB-based backend stack, replacing the previous Xlib-based implementation. XCB provides more predictable thread-safety and improves the reliability of multithreaded capture.
The previous Xlib implementation remains available as a fallback for systems where the XCB backend cannot be used. See the GNU/Linux usage documentation for configuration details.
Linux now uses XShmGetImage by default, allowing MSS to capture screenshots using the X11 shared-memory extension when it is available.
With this method, the X server writes pixel data directly into a shared memory buffer provided by the client, avoiding the extra copy required by the traditional XGetImage path. This reduces overhead during capture and dramatically improves performance for applications that take screenshots frequently.
If shared memory is not available, MSS automatically falls back to XGetImage.
The new Linux backend can significantly reduce screenshot capture overhead.
In local testing (local desktop system, Debian testing, X11, 4K display), a tight loop capturing the full screen (1000 iterations, best of three runs) improved from:
10.1.0: 46.2 ms per screenshot
10.2.0: 9.48 ms per screenshot
This represents roughly a 5× reduction in capture time in that environment.
The improvement comes primarily from the new backend architecture and the use of the X11 shared-memory extension (XShmGetImage), which avoids an additional memory copy when transferring pixel data from the X server.
Actual performance improvements will vary depending on factors such as:
Windows has received capture-reliability improvements and we have named the backend, for operational consistency with Linux.
CreateDIBSectionThe Windows screenshot implementation now uses CreateDIBSection instead of GetDIBits.
This reduces memory overhead and improves reliability during long capture sessions.
Additional improvements include:
The existing GDI implementation has been converted to a named backend, "gdi".
It is currently the only backend for Windows and therefore the default. We plan
to add a DXGI backend in the near future.
These changes were made while keeping backwards compatibility with the existing API.
A memory leak in the macOS backend has been fixed.
This release introduces deprecations that will take effect in MSS 11.0.
These changes are intended to improve:
Most users will not need to change anything immediately.
If you are unsure whether you are affected, search your codebase for the names mentioned below.
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. Python 3.9 is still supported in the MSS 10.2 release, but MSS 11 will require Python 3.10 or later.
mss.ScreenShot.rawStatus: Deprecated Removal: 11.0
Use bgra instead.
# Before
data = screenshot.raw
# After
data = screenshot.bgra
Important differences:
raw is mutablebgra is immutableIn 11.0, screenshot pixel buffers will no longer support in-place modification.
If your application relies on modifying screenshot pixels directly, please open an issue so we can discuss your use case.
To prepare for future GPU capture support, the screenshot class hierarchy will change in 11.0.
ScreenShot will become a base class with specialized implementations:
ScreenShot
└── ScreenShotCPU
In preparation for this change, 10.2.0 introduces ScreenShotCPU as a subclass of the current ScreenShot class.
Users who rely on type annotations can begin migrating now:
foo: mss.ScreenShotCPU = sct.grab()
This annotation works in both 10.2.x and 11.x.
If you do not use explicit type annotations, no changes are required.
In 11.0, monitor dictionaries will become a dedicated Monitor class.
To maintain compatibility:
monitor["left"]
monitor["top"]
grab() will continue accepting dictionariesIf you use type annotations, you can switch to the provided Monitor type:
from mss.models import Monitor
This works in both 10.2.x and 11.x.
bgra Return TypeIn 11.0, ScreenShot.bgra will return a bytes-like object, not necessarily a bytes instance.
Code that treats the result as binary data will continue to work.
If your code checks for an exact type, update it to accept bytes-like objects:
isinstance(data, (bytes, bytearray, memoryview))
cls_image Constructor BehaviorThe constructor signature used when providing a custom screenshot class via cls_image may change in 11.0.
If you implement a custom class, ensure your constructor accepts flexible arguments:
def __init__(self, *args, **kwargs):
If you do not use cls_image, you are unaffected.
The following attributes were never intended as public API and will be removed in 11.0.
If you need these system libraries, load them directly via ctypes.
mss.windows.MSS.user32mss.windows.MSS.gdi32mss.darwin.MSS.max_displaysMost users are not affected.
If you believe an upcoming change could impact your workflow, please open an issue so we can discuss it before 11.0.
Full Changelog: https://github.com/BoboTiG/python-mss/compare/v10.1.0...v10.2.0
One column per quarter.
:heart: contributors: @brycedrennan
:heart: contributors: @brycedrennan
mss.darwin.IMAGE_OPTIONS = 0. (#257)❤️ contributors: @kianmeng , @shravanasati , @mgorny
❤️ contributors: @kianmeng, @shravanasati, @mgorny
🐍 added support for Python 3.13
❤️ contributors: @Andon-Li
🐛 CLI: fixed entry point not taking into account arguments
:heart: contributors: @mgorny, @CTPaHHuK-HEbA
:heart: contributors: @mgorny, @CTPaHHuK-HEbA
XOpenDisplay() call (fixes #246)xvfb-run on GitHub Actions (#248)test_get_pixels.py, and try to fix a random failure at the same time (related to #251)PyVirtualDisplay instead of xvfbwrapper (#249):heart: contributors: @mgorny, @relent95
:heart: contributors: @mgorny, @relent95
.close() (#241)XRRCrtcInfo.width, and XRRCrtcInfo.height, C typesmaster branch to main🐞 fixed SetuptoolsDeprecationWarning: Installing 'XXX' as data is deprecated, please list it in packages
SetuptoolsDeprecationWarning: Installing 'XXX' as data is deprecated, please list it in packages🐞 MSS: ensure --with-cursor, and with_cursor argument & attribute, are simple NOOP on platforms not supporting the feature
--with-cursor, and with_cursor argument & attribute, are simple NOOP on platforms not supporting the featureScreenShotError when -q, or --quiet, is used but return 1test_entry_point() with multiple monitors having the same resolution⚠️ removed support for Python 3.6
- :bug: fixed the wheel package
:heart: contributors: @CTPaHHuK-HEbA, @Tonyl314, @ArchangeGabriel
:heart: contributors: @CTPaHHuK-HEbA, @Tonyl314, @ArchangeGabriel
f-string, ran isort & black) (close #101)MSS: reworked how C functions are initialised
test_entry_point() when there are several monitorsremoved usage of deprecated license_file option for license_files
license_file option for license_filestest_grab_with_tuple_percents() (fixes #142):heart: contributors: @narumishi
:heart: contributors: @narumishi
MSSMixin to MSSBase, now derived from abc.ABCMeta:heart: contributors: @hugovk, @foone, @SergeyKalutsky
:heart: contributors: @hugovk, @foone, @SergeyKalutsky
__slots__ for better performancesproject_urls to setup.cfg:warning: The source code is now derived from master, where Python 2 support has been dropped.
:warning: The source code is now derived from master, where Python 2 support has been dropped.
Windows: ignore missing SetProcessDPIAware() on Window XP
SetProcessDPIAware() on Window XPLinux: fix several XLib functions signature (fixes #92)
MSS: remove use of setup.py for setup.cfg
setup.py for setup.cfgMSSBase to MSSMixin in base.pyargtype, restype and errcheck setup (fixes #84)grab()new contributors: @hugovk, @andreasbuhr
test_entry_point() with multiple monitorsLinux: fix a memory leak introduced with 7e8ae5703f0669f40532c2be917df4328bc3985e (fixes #72)
Linux: add an error handler for the XServer to prevent interpreter crash (fix #61)
setup.pyScreenshot.pixel() method (thanks to @mchlnix)Windows: enable Hi-DPI awareness
:warning: removed support for Python 3.4
Screenshot.bgra attributeto_png()leaks.py and benchmarks.py for manual testing:warning: removed support for Python 3.3
MSS: add more way of customization to the output argument of save()
mss entry pointNothing published for this version
big refactor, introducing the ScreenShot class
ScreenShot classNothing published for this version
new contributors: @DavideBecker, @redodo
hasattr to prevent Exception on early exitLinux: use errcheck instead of deprecated restype with callable (fix #11)
errcheck instead of deprecated restype with callable (fix #11)split the module into several files
save_img() to to_png()save(): replace screen argument by monDISPLAY is set but no X server startedget_pixels() insanely fast, use of MSS library (C code)Nothing published for this version
:snake: Python 2.6 to 3.5 ready
--debug argumentsave_img()enum_display_monitors()display into __del__XDestroyImage() instead of XFree()get_pixels()get_pixels()remove Bonus section from README.rst
Linux: fully functional using Xrandr library
new contributors: @sergey-vin, @thehesiod
E713 test for membership should be 'not in'MSSWindows.get_pixelsMSS: fix path where screenshots are saved
review module structure to fit the "Code Like a Pythonista: Idiomatic Python"
enum_display_monitors() methodscodespell tool--debug to the command linecallback)MSS:save_img() methodWindows: few optimizations into _arrange()
_arrange()Linux: use of memoization => huge time/operations gains
MSS: remove ext argument, using only PNG
ext argument, using only PNGpng()get_pixels()new contributors: @oros42, @eownis
Your coding agent can read these notes before it upgrades. Set up the MCP server →