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/mayuno.jpg -n 16 2 -t 0.7 -c -i makima

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] [-i {linear,cubic,akima,makima}] [-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))
  -i {linear,cubic,akima,makima}, --interpolation {linear,cubic,akima,makima}
                        interpolation method (linear: Linear, cubic: CubicSpline,
                        akima: AkimaSpline, makima: ModifiedAkimaSpline)
                        (default: linear)
  -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.1.0.tar.gz (21.3 MB view details)

Uploaded Source

Built Distribution

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

eqlm-1.1.0-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for eqlm-1.1.0.tar.gz
Algorithm Hash digest
SHA256 fd1cff3c0051eb96ed945c5c5c05a783cff2aae73c2ef4dba81cff0b99d261ef
MD5 783935f245081c8cde1639ac952dd41f
BLAKE2b-256 08286b2d853d033eda361e80cecf24bead6ccf1b6f65e6d6779e4fb012fb0037

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for eqlm-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2feeca743a11a8508d7de68d05fe0593079deadd6a258e40edb69abf565068be
MD5 b0a12bb99968147b0130700cba6b7bfd
BLAKE2b-256 b4a3a1f7aaf3df0b63fe2cbad418499a9dde30d89b56a6287b7339231d6b56be

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