summary refs log tree commit diff
path: root/pamfixtrunc.html
blob: 512b3777380d9dc39f872b5a84f436609a3cc6e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Pamfixtrunc User Manual</title></head>
<body>
<h1>pamfixtrunc</h1>

<h2>NAME</h2>

pamfixtrunc - replaced by pamfix

<h2>DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>pamfixtrunc</b> was replaced in Netpbm 10.66 (March 2014) by
<b><a href="pamfix.html">pamfix</a></b>.

<p><b>pamfix</b> with a <b>-truncate</b> option is the same thing as
<b>pamfixtrunc</b>.  But <b>pamfix</b> has other options to repair other
kinds of corruption.

<p>Another change that came with Netpbm 10.66 is that an invalid sample value
(a value greater than the maxval the image declares in its header) is
considered by the common Netpbm image reading facility (in libnetpbm) to be
unreadable, which means the file is essentially truncated.  In older Netpbm,
the invalid sample value propagates to the output in a program such as
<b>pamfixtrunc</b>.  Thus, in older Netpbm a file with 100 rows and an invalid
sample value in the 3rd row would pass through <b>pamfixtrunc</b> unchanged.
But in Netpbm 10.66, <b>pamfix -truncate</b> with the same input would produce
an output image with only 2 rows.  While it is not possible in 10.66 to
cause <b>pamfix</b> to generate an invalid Netpbm image, you can
use <b>-clip</b> and <b>-changemaxval</b> options to avoid truncating the
file in a case like this.

<p>You should not make any new use of <b>pamfixtrunc</b> and if you modify an
existing use, you should upgrade to <b>pamfixtrunc</b>.  But note that if you
write a program that might have to be used with very old
Netpbm, <b>pamfixtrunc</b> is the only way to do that.

</body>
</html>