Metadata-Version: 2.4
Name: squarepix
Version: 0.1.2
Summary: Crop images to a square and resize them in bulk, without stretching or distortion.
Author-email: Harsh Sachan <harshsachan8400@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/yourusername/squarepix
Keywords: image,crop,resize,square,batch,pillow
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow>=9.0.0
Dynamic: license-file

# squarepix

squarepix is a simple Python tool that prepares images for computer vision and deep learning projects. Instead of just resizing an image (which can stretch and distort it), squarepix first crops it evenly from the center to make it a perfect square, then resizes it smoothly.
This is useful when you're building datasets for image classification, object detection, or image segmentation, where images need to be the same size without looking stretched or squished. You can process a whole folder of images with one command, or use it directly in your own Python code.
## Install

```bash
pip install squarepix
```

## Usage (command line)

```bash
squarepix "D:\InputImages" "D:\OutputImages"
squarepix "D:\InputImages" "D:\OutputImages" --size 512 512
```

## Usage (Python)

```python
from squarepix import process_folder

process_folder("D:/InputImages", "D:/OutputImages", output_size=(640, 640))
```

## Supported formats

`.jpg .jpeg .png .bmp .tif .tiff .webp`
