Image process framework based on plugin like imagej, it is esay to glue with scipy.ndimage, scikit-image, opencv, simpleitk, mayavi...and any libraries based on numpy
Some plugin may be not loaded, but not affect others!
>>> menus/Plugins screencap_plg.py ImageGrab is macOS and Windows only
I recommend replacing it with the cross-platform and actively maintained pyscreenshot tool. The syntax would remain the same (see the Examples section of the previous link), so it's a drop-in replacement for ImageGrab.
If you don't want more dependencies, just use (copied from here)
import wx
wx.App() # Need to create an App instance before doing anything
screen = wx.ScreenDC()
size = screen.GetSize()
bmp = wx.EmptyBitmap(size[0], size[1])
mem = wx.MemoryDC(bmp)
mem.Blit(0, 0, size[0], size[1], screen, 0, 0)
del mem # Release bitmap
bmp.SaveFile('screenshot.png', wx.BITMAP_TYPE_PNG)
I tried it and works on multi-monitor setups as well. The advantage is that there is no additional dependency as wxpython is already a requirement for ImagePy.
The ImageGrab module cannot load under Linux:
I recommend replacing it with the cross-platform and actively maintained pyscreenshot tool. The syntax would remain the same (see the Examples section of the previous link), so it's a drop-in replacement for ImageGrab. If you don't want more dependencies, just use (copied from here)
I tried it and works on multi-monitor setups as well. The advantage is that there is no additional dependency as wxpython is already a requirement for ImagePy.