LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ppmgamma

Apply gamma correction to PPM images

TLDR

Apply gamma correction
$ ppmgamma [2.2] [input.ppm] > [output.ppm]
copy
Lighten image
$ ppmgamma [0.5] [input.ppm] > [output.ppm]
copy
Darken image
$ ppmgamma [2.0] [input.ppm] > [output.ppm]
copy
Per-channel gamma
$ ppmgamma [1.0] [1.2] [1.0] [input.ppm] > [output.ppm]
copy

SYNOPSIS

ppmgamma gamma [ppmfile]ppmgamma rgamma ggamma bgamma [ppmfile]

DESCRIPTION

ppmgamma applies gamma correction to a PPM image. Gamma < 1 lightens the image, gamma > 1 darkens it. Each pixel value is raised to the power of 1/gamma.Part of Netpbm toolkit.

PARAMETERS

gamma

Gamma value for all channels.
rgamma, ggamma, bgamma
Per-channel gamma values.

EXAMPLES

$ # Standard gamma correction
ppmgamma 2.2 image.ppm > corrected.ppm

# Lighten dark image
ppmgamma 0.5 dark.ppm > lighter.ppm

# Darken bright image
ppmgamma 2.0 bright.ppm > darker.ppm

# Adjust blue channel only
ppmgamma 1.0 1.0 1.3 image.ppm > blue_adjusted.ppm

# Reverse gamma
ppmgamma 0.45 linear.ppm > srgb.ppm
copy

GAMMA VALUES

$ < 1.0  - Lighten midtones
= 1.0  - No change
> 1.0  - Darken midtones
2.2    - Typical monitor gamma
copy

CAVEATS

Use pamgamma for more features. Values at 0 and max unchanged. Part of Netpbm.

HISTORY

ppmgamma is part of Netpbm by Jef Poskanzer, implementing gamma correction for images.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid