diff --git a/pages/common/pamfix.md b/pages/common/pamfix.md new file mode 100644 index 000000000..1ea7d9c70 --- /dev/null +++ b/pages/common/pamfix.md @@ -0,0 +1,17 @@ +# pamfix + +> Fix errors in PAM, PBM, PGM and PPM files. +> See also: `pamfile`, `pamvalidate`. +> More information: . + +- Fix a Netpbm file that is missing its last part: + +`pamfix -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 -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 -changemaxval {{path/to/corrupted.pam|pbm|pgm|ppm}} > {{path/to/output.pam|pbm|pgm|ppm}}` diff --git a/pages/common/pamfixtrunc.md b/pages/common/pamfixtrunc.md new file mode 100644 index 000000000..cd892c1ff --- /dev/null +++ b/pages/common/pamfixtrunc.md @@ -0,0 +1,8 @@ +# pamfixtrunc + +> This command is superseded by `pamfix -truncate`. +> More information: . + +- View documentation for the current command: + +`tldr pamfix` diff --git a/pages/common/pamvalidate.md b/pages/common/pamvalidate.md new file mode 100644 index 000000000..cc90a8e4d --- /dev/null +++ b/pages/common/pamvalidate.md @@ -0,0 +1,9 @@ +# pamvalidate + +> Validate PAM, PGM, PBM and PPM files. +> See also: `pamfile`, `pamfix`. +> More information: . + +- Copy a Netpbm file from `stdin` to `stdout` if and only if it valid; fail otherwise: + +`{{command}} | pamvalidate > {{path/to/output.ext}}`