Metadata-Version: 2.4
Name: qshoot2
Version: 0.1.0
Summary: A simple and powerful Python library for taking screenshots
Author-email: QShoot Contributors <contributors@qshoot.dev>
License: MIT License
        
        Copyright (c) 2025 Your Name
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/qshoot-dev/qshoot2
Project-URL: Repository, https://github.com/qshoot-dev/qshoot2.git
Project-URL: Documentation, https://github.com/qshoot-dev/qshoot2#readme
Project-URL: Bug Tracker, https://github.com/qshoot-dev/qshoot2/issues
Keywords: screenshot,screen capture,image,gui,automation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Multimedia :: Graphics :: Capture :: Screen Capture
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyautogui>=0.9.54
Requires-Dist: Pillow>=10.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: license-file

# qshoot22

A simple and powerful Python library for taking screenshots.

## Features

- 📸 Easy-to-use screenshot capture
- 🎯 Capture full screen or specific regions
- 💾 Save screenshots to custom directories
- 🔧 Return PIL Image objects for further processing
- 🐍 Python 3.8+ support
- 📦 Cross-platform (Windows, macOS, Linux)

## Installation

```bash
pip install qshoot22
```

For development:

```bash
pip install qshoot22[dev]
```

## Quick Start

### Basic Usage

```python
from qshoot2 import Screenshot

# Create a screenshot instance
shooter = Screenshot()

# Capture full screen and save
filepath = shooter.capture_full_screen()
print(f"Screenshot saved to: {filepath}")

# Capture full screen and get PIL Image object
image = shooter.capture_full_screen(return_image=True)
image.show()
```

### Capture Region

```python
# Capture a specific region (x, y, width, height)
shooter = Screenshot()
image = shooter.capture_region(100, 100, 500, 300, return_image=True)
image.show()
```

### Custom Output Directory

```python
from pathlib import Path

# Set custom output directory
shooter = Screenshot(output_dir=Path("./screenshots"))
filepath = shooter.capture_full_screen(filename="my_screenshot")
```

### Utility Functions

```python
from qshoot2 import capture, capture_region

# Quick capture
image = capture(return_image=True)

# Quick region capture
image = capture_region(0, 0, 200, 200, return_image=True)
```

### Get Screen Size

```python
from qshoot2 import Screenshot

width, height = Screenshot.get_screen_size()
print(f"Screen resolution: {width}x{height}")
```

## Advanced Usage

### With Custom Filename

```python
shooter = Screenshot()
filepath = shooter.capture_full_screen(filename="desktop_2025")
```

### Processing Screenshots

```python
from qshoot2 import Screenshot
from PIL import Image, ImageFilter

shooter = Screenshot()
image = shooter.capture_full_screen(return_image=True)

# Apply filters
blurred = image.filter(ImageFilter.BLUR)
grayscale = image.convert('L')

# Save processed images
blurred.save("blurred.png")
grayscale.save("grayscale.png")
```

## API Reference

### Screenshot Class

#### `__init__(output_dir=None)`
Initialize Screenshot instance.

- `output_dir`: Directory to save screenshots (default: current directory)

#### `capture(region=None, filename=None, return_image=False)`
Take a screenshot.

- `region`: Tuple of (x, y, width, height) for partial screenshot
- `filename`: Custom filename (without extension)
- `return_image`: If True, returns PIL Image object
- Returns: PIL Image object or Path to saved file

#### `capture_full_screen(filename=None, return_image=False)`
Capture full screen.

- `filename`: Custom filename
- `return_image`: If True, returns PIL Image object
- Returns: PIL Image object or Path to saved file

#### `capture_region(x, y, width, height, filename=None, return_image=False)`
Capture a specific region.

- `x, y`: Top-left coordinates
- `width, height`: Dimensions of region
- `filename`: Custom filename
- `return_image`: If True, returns PIL Image object
- Returns: PIL Image object or Path to saved file

#### `get_screen_size()`
Get the screen resolution.

- Returns: Tuple of (width, height)

## Requirements

- Python 3.8+
- pyautogui >= 0.9.54
- Pillow >= 10.0.0

## Development

### Running Tests

```bash
pytest
```

### Code Formatting

```bash
black qshoot2 tests
isort qshoot2 tests
```

### Type Checking

```bash
mypy qshoot2
```

## License

MIT License - see [LICENSE](LICENSE) for details.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Support

If you encounter any issues, please report them on the [GitHub Issues](https://github.com/qshoot2-dev/qshoot2/issues) page.

## Changelog

### 0.1.0 (2025-01-19)
- Initial release
- Basic screenshot capture functionality
- Full screen and region capture
- Custom output directory support
- PIL Image object return option
