LinuxCommandLibrary

pamdepth

changes image bit depth

TLDR

Change bit depth

$ pamdepth [8] [input.pam] > [output.pam]
copy
Convert to 16-bit
$ pamdepth 65535 [input.pam] > [output.pam]
copy
Convert to 1-bit
$ pamdepth 1 [input.pam] > [output.pam]
copy

SYNOPSIS

pamdepth maxval [file]

DESCRIPTION

pamdepth changes image bit depth. Rescales pixel values.
The tool converts between depths. Part of Netpbm.

PARAMETERS

MAXVAL

Maximum pixel value (determines bit depth).
FILE
Input PAM/PNM file.

CAVEATS

Part of Netpbm. Rescales values. May lose precision.

HISTORY

pamdepth is part of Netpbm for bit depth conversion.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community