Skip to main content

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

pip install squarepix

Usage (command line)

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

Usage (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

Release files for squarepix 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for squarepix 0.1.3
File Size Uploaded
squarepix-0.1.3.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for squarepix 0.1.3
File Interpreter ABI Platform
squarepix-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / squarepix-0.1.3.tar.gz

Download URL squarepix-0.1.3.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f07863889df742e2f86892c1d16ec3d500453d12103250e503e198ec2ecb5f42
BLAKE2b-256 checksum
How to use checksums
3fd1135d1cc652682dc7366ee586ae013292dab9c25632765cbf4f5ccccad2ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / squarepix-0.1.3-py3-none-any.whl

Download URL squarepix-0.1.3-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5b0274e12909fa3a24158f77d5fd8a3fcf3434b05590ea03e7c438e2ab866bb
BLAKE2b-256 checksum
How to use checksums
68023c564912576a2ce71dcdbc6c0b14cf557a553155f744fe10154385a70385
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page