1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/pamfix.md
Juri Dispan 8b9720a256
pamfixtrunc, pamfix, pamvalidate: add pages (#12406)
* pamfixtrunc, pamfix, pamvalidate: add pages

---------

Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-03-24 14:15:01 +05:30

17 lines
645 B
Markdown

# 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 -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}}`