Skip to main content

A simple Python snipping tool using Tkinter and PIL

Project description

SnippingTool

SnippingTool is a simple and intuitive screen capture tool that allows you to select a region of the screen using your mouse. Once the area is selected, the tool captures the region as an image. It uses a transparent overlay to let you draw a selection area, and once you release the mouse button, the tool captures and returns the image.

Usage

To use the SnippingTool, you just need to initialize the tool and call the capture() method. Here's a basic example of how to use it:

from snippingtool import SnippingTool

# Create an instance of SnippingTool
snipping = SnippingTool()

# Capture a selected area of the screen
image, bounding_box = snipping.capture()

# Save the captured image to a file
image.save('captured_area.png')

# Print the bounding box of the captured area
print(f'Bounding box: {bounding_box}')

License

This code is open-source and licensed under the MIT License. Feel free to use, modify, and distribute the code as per your requirements.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snippingtool-0.2.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snippingtool-0.2.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file snippingtool-0.2.0.tar.gz.

File metadata

  • Download URL: snippingtool-0.2.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for snippingtool-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5250aa484e859892072c386a68d04fc11fee8429ddcf88e5049b5046557bf8ba
MD5 032089a43167eea826e943442bee79cb
BLAKE2b-256 7d44170ecdbbe20e5a9d0627e5fb3759984c87bb2f6a630958e1fefb5c1ab1ae

See more details on using hashes here.

File details

Details for the file snippingtool-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: snippingtool-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for snippingtool-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e29fee4accc7df788dc306c69486bc10794cad50072129dd9844bb927ea207e8
MD5 bf3fe70e9084bff6b90ad2b5b7d757f8
BLAKE2b-256 6e05ac954d8094ac5374f655072b65013612f55a6e82e76474e3994c42240419

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page