HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

pamfix — Fix errors in PAM, PBM, PGM, and PPM files. See also: `pamfile`, `pamvalidate`. More information: <h

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandfixpamerrorspamfixclipgmpbm

Problem

How to use the pamfix command: Fix errors in PAM, PBM, PGM, and PPM files. See also: pamfile, pamvalidate. More information: <https://netpbm.sourceforge.net/doc/pamfix.html>.

Solution

pamfix — Fix errors in PAM, PBM, PGM, and PPM files. See also: pamfile, pamvalidate. More information: <https://netpbm.sourceforge.net/doc/pamfix.html>.

Fix a Netpbm file that is missing its last part:
pamfix {{[-t|-truncate]}} {{path/to/corrupted.ext}} > {{path/to/output.ext}}


Fix a Netpbm file where pixel values exceed the image's maxval by lowering the offending pixels' values:
pamfix {{[-cl|-clip]}} {{path/to/corrupted.ext}} > {{path/to/output.ext}}


Fix a Netpbm file where pixel values exceed the image's maxval by increasing it:
pamfix {{[-ch|-changemaxval]}} {{path/to/corrupted.pam|pbm|pgm|ppm}} > {{path/to/output.pam|pbm|pgm|ppm}}

Code Snippets

Fix a Netpbm file that is missing its last part

pamfix {{[-t|-truncate]}} {{path/to/corrupted.ext}} > {{path/to/output.ext}}

Fix a Netpbm file where pixel values exceed the image's `maxval` by lowering the offending pixels' values

pamfix {{[-cl|-clip]}} {{path/to/corrupted.ext}} > {{path/to/output.ext}}

Fix a Netpbm file where pixel values exceed the image's `maxval` by increasing it

pamfix {{[-ch|-changemaxval]}} {{path/to/corrupted.pam|pbm|pgm|ppm}} > {{path/to/output.pam|pbm|pgm|ppm}}

Context

tldr-pages: common/pamfix

Revisions (0)

No revisions yet.