Skip to main content

A simple CLI tool for processing images.

Project description

MS Image Process

A simple and command-line tool for resizing, scaling, and grayscale conversion of images.

Features

  • Resize images to specific dimensions
  • Scale images by a factor
  • Convert images to grayscale
  • Adjust image brightness and contrast
  • Rotate images by 90°, 180°, or 270°
  • Auto-orient images based on EXIF data
  • Simple command-line interface

Installation

  1. Ensure you have Python 3.8 or higher installed
  2. Install the package using pip:
    pip install ms-image
    

Usage

ms-image input.jpg output.png [OPTIONS]

Options

  • --width WIDTH, -w Set the output image width (maintains aspect ratio)
  • --height HEIGHT, -h Set the output image height (maintains aspect ratio)
  • --scale SCALE, -s Scale the image by a factor (e.g., 0.5 for 50% size)
  • --grayscale, -g Convert the image to grayscale
  • --brightness FACTOR, -b Adjust image brightness (default: 1.0)
  • --contrast FACTOR, -c Adjust image contrast (default: 1.0)
  • --rotate DEGREES, -r Rotate image (90, 180, or 270 degrees clockwise)

Examples

Resize an image to 800px width (maintaining aspect ratio):

ms-image input.jpg output.jpg --width 800

Scale an image to 50% of its original size:

ms-image input.jpg output.jpg --scale 0.5

Convert an image to grayscale and scale it to 50% of its original size:

ms-image input.jpg output.jpg --grayscale --scale 0.5

Resize an image to 1200px width, adjust brightness and contrast, and rotate it 180 degrees:

ms-image input.jpg output.jpg --width 1200 --brightness 1.1 --contrast 1.2 --rotate 180

Dependencies

  • Python 3.8+
  • Pillow >= 12.0.0
  • Click >= 8.3.1

License

MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. Keep in mind that this is intended to be a simple and easy to use CLI tool without any complex features.

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

ms_image_process-0.4.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

ms_image_process-0.4.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file ms_image_process-0.4.0.tar.gz.

File metadata

  • Download URL: ms_image_process-0.4.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ms_image_process-0.4.0.tar.gz
Algorithm Hash digest
SHA256 97abe223a5a3be8e56fe4f6710c4f95cc128fd869151bf7cad595b62a16b5bbb
MD5 49b25dcb39351ad6666d4e2e1bece720
BLAKE2b-256 4d8276de92b5f55700fc19a832d7eb334564545a30fb892ba0f02fc981383fcc

See more details on using hashes here.

File details

Details for the file ms_image_process-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ms_image_process-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d6dc6ca27f60cfb8ee57af6fe88914b874488ebbfc9c66ea4e94f655bcaf7b8
MD5 26bb9ad350f0583ad7685657b35d7c9d
BLAKE2b-256 1a2ecc8d26fc881514d3eda44cda1e5e8ee7d357fb9dd76f4cc0bb1c8e9feb70

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