Update cheatsheets

This commit is contained in:
ivuorinen
2024-03-25 00:14:11 +00:00
parent ae71584b37
commit 17655fbe93
6 changed files with 114 additions and 5 deletions

22
tldr/pamfix Normal file
View File

@@ -0,0 +1,22 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# 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}}`