LinuxCommandLibrary

ppmbrighten

Adjust PPM image brightness and saturation

TLDR

Increase brightness

$ ppmbrighten -v [50] [input.ppm] > [output.ppm]
copy
Decrease saturation
$ ppmbrighten -s [-30] [input.ppm] > [output.ppm]
copy
Adjust both
$ ppmbrighten -v [20] -s [10] [input.ppm] > [output.ppm]
copy
Normalize first
$ ppmbrighten -n -v [30] [input.ppm] > [output.ppm]
copy

SYNOPSIS

ppmbrighten [options] [ppmfile]

DESCRIPTION

ppmbrighten adjusts the brightness and saturation of a PPM image. It works in HSV color space, changing value (V) and saturation (S) components.
Part of Netpbm toolkit.

PARAMETERS

-v value

Value (brightness) change (-100 to 100).
-s saturation
Saturation change (-100 to 100).
-n
Normalize value range first.

EXAMPLES

$ # Brighten image
ppmbrighten -v 30 photo.ppm > bright.ppm

# Desaturate (toward grayscale)
ppmbrighten -s -50 photo.ppm > muted.ppm

# Increase vibrancy
ppmbrighten -s 40 photo.ppm > vivid.ppm

# Normalize and brighten
ppmbrighten -n -v 20 dark.ppm > fixed.ppm

# Chain operations
jpegtopnm photo.jpg | ppmbrighten -v 20 | pnmtojpeg > bright.jpg
copy

CAVEATS

Values outside -100 to 100 are clamped. Works on PPM only. Consider pamaltsat for more options.

HISTORY

ppmbrighten is part of Netpbm by Jef Poskanzer and contributors for basic color adjustment.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community