A Snipping Tool built using Python that allows users to capture screenshots, similar to windows snip tool (WIN + Shift + S)
The Python Snipping Tool is an open-source project, similar to the one found in Windows. Users can capture single or multiple screen snips using this tool. The tool is actually made to use in another project. So not optimized much to use alone.
- Capture screenshots of the specific region.
- Capture screenshots of multiple ROIs.
- Save screenshots in popular image formats (PNG, JPEG, etc.).
- Python 3.x
- Tkinter
- Pillow
-
Clone the repository:
git clone https://github.com/abdxzi/sniptool.git
-
Navigate to the project directory:
cd sniptool
Run the snipping_tool.py
by double click
from snipper import ScreenSnipper
app = ScreenSnipper()
snips = app.snip()
print(snips)
# [<PIL.Image.Image image mode=RGB size=310x250 at 0x228AEDB4D50>, <PIL.Image.Image image mode=RGB size=454x307 at 0x228AEDB4E10>]
The program retruns screenshots as an array of PIL images that can be processed further. We can save the images to suitable formate as using Pillow library save()
:
for image in snips:
image.save(output_path, format='PNG')
Contributions are welcome!
Distributed under the MIT License. See LICENSE
for more information.