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, contrast, and sharpness
  • 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)
  • --sharpness FACTOR, -sh Adjust image sharpness (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

Enhance the sharpness of an image while converting to grayscale:

ms-image input.jpg output.jpg --grayscale --sharpness 1.8

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.5.0.tar.gz (5.1 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.5.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ms_image_process-0.5.0.tar.gz
  • Upload date:
  • Size: 5.1 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.5.0.tar.gz
Algorithm Hash digest
SHA256 1709f56757e09500c92eab10159dd6bf87b31129cc50c7b42a2398dab4ac4d18
MD5 9107af819170028ad30f723b8ff60012
BLAKE2b-256 d6f3f372a3ff5de171acee44701a8bce4bad2eb48fcfd7d75e67a6170964403b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ms_image_process-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f2c2662125dfdc5a76a6268d6476ad7ed700b7f216d3c5ba8a81129d343f727
MD5 6cf3174c923ee886f4ff815125034870
BLAKE2b-256 184624bafca3a21b9734fec2a942f83419f8488fa623263d5a1b61a848045f8f

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