Skip to main content

Simple CLI tool to spatially equalize image luminance

Project description

Eqlm

Simple CLI tool to spatially equalize image luminance, lightness, saturation, or brightness

Examples

$ eqlm images/macaron.jpg -n 3 2 -t 0.8 -c

Source Result
Input Image Output Image

$ eqlm images/yaesu-wall.jpg -m lightness -t 0.9 -n 9 6

Source Result
Input Image Output Image

$ eqlm images/hakone.jpg -m saturation -t 0.2 --clamp

Source Result
Input Image Output Image

Install

pip3 install eqlm

Usage

The main program can be invoked either through the eqlm command or through the Python main module option python3 -m eqlm.

usage: eqlm [-h] [-v] [-m {luminance,brightness,saturation,lightness}]
            [-n M N] [-t RATE] [-c] [-e] [-u] [-g [GAMMA]] [-d {8,16}] [-s] [-x]
            IN_FILE [OUT_FILE]

Options

positional arguments:
  IN_FILE               input image file path (use '-' for stdin)
  OUT_FILE              output PNG image file path (use '-' for stdout)
                        (default: Auto)

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -m {luminance,brightness,saturation,lightness}
  --mode {luminance,brightness,saturation,lightness}
                        processing mode (default: luminance)
  -n M N, --divide M N  divide image into MxN (Horizontal x Vertical) blocks
                        for aggregation (default: (2, 2))
  -t RATE, --target RATE
                        set the target rate for the output level, ranging from
                        0.0 (minimum) to 1.0 (maximum) (default: Average)
  -c, --clamp           clamp the level values in extrapolated boundaries
                        (default: False)
  -e, --median          aggregate each block using median instead of mean
                        (default: False)
  -u, --unweighted      disable weighting based on the alpha channel
                        (default: False)
  -g [GAMMA], --gamma [GAMMA]
                        apply inverse gamma correction before process
                        [GAMMA=2.2] (default: None)
  -d {8,16}, --depth {8,16}
                        bit depth of the output PNG image (default: 8)
  -s, --slow            use the highest PNG compression level (default: False)
  -x, --no-orientation  ignore the Exif orientation metadata (default: False)

License

GNU Affero General Public License v3.0

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

eqlm-1.0.0.tar.gz (16.4 MB view details)

Uploaded Source

Built Distribution

eqlm-1.0.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file eqlm-1.0.0.tar.gz.

File metadata

  • Download URL: eqlm-1.0.0.tar.gz
  • Upload date:
  • Size: 16.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.7

File hashes

Hashes for eqlm-1.0.0.tar.gz
Algorithm Hash digest
SHA256 01e65f878baf4fba83e3416f7ec8c7eb0869290ae2c9e041868b23d05116d45c
MD5 859978af32e9f4cd4a7ba9d657ddfb4b
BLAKE2b-256 c51f2fa77e3e6d4224cc1365e501efd0510fbfb02bce226f8019a9566255262c

See more details on using hashes here.

File details

Details for the file eqlm-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: eqlm-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.7

File hashes

Hashes for eqlm-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fdba0b6312d414226d95de1fec64782de48d04e5b149d2a41886d12e3a45bbe0
MD5 2782d673e6725b8c74a8bdd06af4b1c4
BLAKE2b-256 b38d6664d9aaa1e62e0f498015a6ab0a0de2379841ae32f7f22fca2c8294cd5f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page