DEV Community

Abdul Azeez V
Abdul Azeez V

Posted on

Snip tool

Hello there, this is my first post here.

I developed a python version of snip tool, similar to the one found in Windows. I was building a OCR related application. I needed to control the screen capture programatically. But the one in windows (WIN + Shift + S) couldn't do it. So i created one using tkinter and PIL package.

sniptool

Usage:

To snip screen directly,

git clone https://github.com/abdxzi/sniptool.git
cd sniptool
python snipping_tool.py
Enter fullscreen mode Exit fullscreen mode

Add in programs,

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>]
Enter fullscreen mode Exit fullscreen mode

Returns PIL Imgae format, which can be further used in programs.

Source Code

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay