Skip to main content

Fast offline image compressor for optimizing images under size constraints

Project description

ImgCompress

A fast, offline image compression library designed to optimize images under a size constraint while preserving maximum possible quality.


Features

  • Adaptive quality optimization (maintains best possible quality)
  • Supports multiple formats (JPG, PNG, BMP, GIF)
  • Multi-threaded processing for faster batch compression
  • Batch image selection support
  • Automatic temporary file handling

Installation

pip install imgcompress

Usage

Basic Usage

imgcompress
  • Opens a file dialog to select images
  • Prompts for output directory
  • Compresses images automatically

Output Example

Image Compression Complete
Images saved at: C:\Users\YourName\Pictures

Compression sizes compared to original:

Image                          Original (MB)   Compressed (MB)
------------------------------------------------------------
thumbnail.png                  : 5.20 -> 1.85
banner.jpg                     : 3.10 -> 1.92

How It Works

  1. Loads selected images
  2. Resizes images (max 1280×720)
  3. Converts to JPEG format
  4. Iteratively reduces quality
  5. Stops at the highest quality under 2MB

Supported Formats

  • .jpg
  • .jpeg
  • .png
  • .bmp
  • .gif

(All outputs are saved as optimized JPEG files)


Notes

  • Images already under 2MB are skipped
  • Output images are compressed and may overwrite existing files if names match
  • Best suited for thumbnails, web images, and quick optimization tasks

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.


License

GNU LICENSE


Author

Built as a practical utility tool for fast and efficient image compression.

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

kaiso_imgcompressor-0.1.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

kaiso_imgcompressor-0.1.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file kaiso_imgcompressor-0.1.0.tar.gz.

File metadata

  • Download URL: kaiso_imgcompressor-0.1.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for kaiso_imgcompressor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e4dce5186b3c53e8ffa71c5c9fd77879dfd916f40a375483251909f3ff096ec5
MD5 c693f079b3ab63a9ec25c51411813016
BLAKE2b-256 3f37189d625aaa8e2581c46a7e395d785b70063a007a590d97ff409987c5c4e1

See more details on using hashes here.

File details

Details for the file kaiso_imgcompressor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kaiso_imgcompressor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcf7cca2af8da5a6fa3f98779ee5cf56aa922a994b5f2700463329716fe0567f
MD5 09a18c8304657e5a8e05d3b6ab64ceda
BLAKE2b-256 6b8a33dd2d906c9f868c5574a3c96c7e3ddebcb38e9a4c85e4a1c3ed762179a4

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