The PIL.ImageGrab.grab () method takes a screenshot. Pixels inside the bounding box are returned as "RGB" on Windows or "RGBA" on macOS. If there is no bounding box, the entire screen is copied.
Syntax: PIL.ImageGrab.garb (bbox = None) parameters: bbox: strong> What region to copy. Default is the entire screen. Returns: An image
For different different bbox values can be used for screen sizes.