Skip to main content

Pixel Press

Pixel Press resizes images so their longest side does not exceed a maximum dimension. It keeps the aspect ratio, never enlarges images, and can process individual files, multiple files, or complete folder trees.

Install

Requires Python 3.10 or newer.

python -m pip install pixel-press

Command-line usage

Resize every supported image in a folder and its subfolders:

imgresizer --dir .\photos --max-dimension 2048 --output .\resized

The directory structure is preserved in the output directory. Images already within the limit are copied unchanged. Images larger than the limit are resized while preserving their aspect ratio.

Useful options:

--dir PATH              Input directory, including subfolders
--output PATH           Output directory (default: <input>_resized)
--max-dimension PIXELS  Maximum longest side (default: 2048)
--verbose               Show debug logging

The CLI logs each copied, resized, or skipped file and prints a final summary.

Web interface

Start the local FastAPI service:

imgresizer

Open http://127.0.0.1:8097 in a browser. The UI supports:

  • One image, downloaded directly after processing
  • Multiple selected images, downloaded as a ZIP
  • A folder drop or folder selection, with subfolders preserved in the ZIP
  • A shared maximum-dimension setting

To use another port:

imgresizer --port 9000

API

The service exposes an OpenAPI page at http://127.0.0.1:8097/docs.

Resize one image:

curl.exe -X POST http://127.0.0.1:8097/api/resize `
  -F "file=@.\photos\image.jpg" `
  -F "max_dimension=2048" `
  -o .\resized-image.jpg

Resize multiple files and receive a ZIP:

curl.exe -X POST http://127.0.0.1:8097/api/resize-folder `
  -F "files=@.\photos\one.jpg" `
  -F "files=@.\photos\two.png" `
  -F "max_dimension=2048" `
  -o .\resized-images.zip

Supported formats

JPEG, PNG, GIF, WEBP, TIFF, BMP, and ICO files are supported. Invalid or unsupported files are skipped during batch processing and reported in the logs.

License

Pixel Press is released under the MIT License.

Download files

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

Source Distribution

pixel_press-1.0.1.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

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

pixel_press-1.0.1-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file pixel_press-1.0.1.tar.gz.

File metadata

  • Download URL: pixel_press-1.0.1.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for pixel_press-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2a0aa5ad2f19b5149a7d3d1f26f4b3cadd27a6282e4c1e23e5f383e23a81292e
MD5 b9ffc4a2f2dea70f6be77ae7580f9868
BLAKE2b-256 1d4be85b8bc77cded6b13791782479598e88519aa9596ca6c3b2525d98e5d242

See more details on using hashes here.

File details

Details for the file pixel_press-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pixel_press-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for pixel_press-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79815d527fe275475781a02cd74d35573d74dcccd6f2d0afc620fe4133632a53
MD5 84010032d95c7819c1702c1b80177998
BLAKE2b-256 d69163190e483bacb4fff85b6db4951efeb9b585a0b54648edcf2c485721b683

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

1 file

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