Linux command
pamfix 命令
网络
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Clip sample values that exceed the maxval
pamfix -clip [corrupted.pam] > [fixed.pam]
Raise the maxval to accommodate out-of-range values
pamfix -changemaxval [corrupted.pam] > [fixed.pam]
Truncate the image at the first invalid sample value
pamfix -truncate [corrupted.pam] > [fixed.pam]
Fix with verbose output
pamfix -clip -verbose [corrupted.pam] > [fixed.pam]
说明
pamfix reads a stream that is mostly a Netpbm image but may have certain types of corruptions and produces a valid Netpbm image that preserves much of the information in the original. It handles two primary corruption types: truncated streams and illegally large sample values. Part of the Netpbm package.
参数
- -clip
- Clip all pixel values that exceed the maxval stated in the header to the maxval. Cannot be combined with -changemaxval.
- -changemaxval
- Raise the maxval to accommodate pixel values that exceed the maxval stated in the header, lowering the fraction represented by every sample. Cannot be combined with -clip.
- -truncate
- Truncate the image at the first invalid sample value. When neither -clip nor -changemaxval is specified, this is the default behavior for out-of-range values.
- -verbose
- Report details of the repair to standard error.
FAQ
What is the pamfix command used for?
pamfix reads a stream that is mostly a Netpbm image but may have certain types of corruptions and produces a valid Netpbm image that preserves much of the information in the original. It handles two primary corruption types: truncated streams and illegally large sample values. Part of the Netpbm package.
How do I run a basic pamfix example?
Run `pamfix -clip [corrupted.pam] > [fixed.pam]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -clip do in pamfix?
Clip all pixel values that exceed the maxval stated in the header to the maxval. Cannot be combined with -changemaxval.