Skip to main content

A simple package for image compression

Project description

Image Optimizer Samuellachisa

A simple and safe image compression tool using the Pillow library.

Installation

pip install image-optimizer-samuellachisa

Usage

from image_optimizer import compress_image, compare_sizes

# Compress an image
compressed_path = compress_image("input.jpg", "output.jpg", quality=70, max_width=800)

# Get stats
stats = compare_sizes("input.jpg", compressed_path)
print(f"Reduced size by {stats['reduction_percent']:.2f}%")

Features

  • Resizing while maintaining aspect ratio.
  • Quality adjustment.
  • Safety check: avoids saving if the compressed file is larger than the original.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

image_optimizer_samuellachisa-0.1.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file image_optimizer_samuellachisa-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for image_optimizer_samuellachisa-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 600243220c7491a7611b8c10043ae759f334ac8602b190c9d181d28b166deced
MD5 be7860670734743e63b7cbe7f44d6abb
BLAKE2b-256 072b087db69e0b5688a1757157413c21bdba73cbbd61274d50a5cf14428e82fa

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