1Pamendian User Manual(0) Pamendian User Manual(0)
2
3
4
6 pamendian - reverse endianness of a Netpbm image
7
8
10 pamendian
11
12
14 This program is part of Netpbm(1).
15
16 All Netpbm formats that have samples in pure binary format with multi‐
17 ple bytes are defined to have them in big endian (most significant byte
18 first) order. However, there exist variations on these formats, pri‐
19 marily developed before official multibyte Netpbm formats existed, that
20 are identical to Netpbm formats in every respect except that samples
21 are in little endian (least signficant byte first) order.
22
23 pamendian reverses the byte order of the sample to convert between the
24 two formats. If the input is true PAM, PGM, or PPM, the output is the
25 little endian variation on that format, and vice versa.
26
27 The X Window System viewer xv expects the little endian variation of
28 PGM and PPM.
29
30 Programs that come with the Independent Jpeg Group's JPEG library are
31 known to use the little endian variation of PGM and PPM.
32
33 The reason some programs use this variant is that at one time during
34 Netpbm's darkage[1m(1),there was a version of Netpbm around that used it.
35 But it was never formally specified.
36
37 This program takes input only on Standard Input. Its output is always
38 on Standard Output.
39
40 You should never have to use this program with images generated by pro‐
41 grams in the Netpbm package or programs that use the Netpbm libraries.
42 If you do, that probably means something needs to be fixed in those
43 programs. The Netpbm converter for any graphics format that represents
44 numbers in little endian form should properly reverse the bytes to cre‐
45 ate correct Netpbm output.
46
47 If you create a Netpbm image from a generic stream of samples, using
48 rawtopgm or rawtoppm, use options on those programs to declare the
49 endianness of your input, thus creating correct endianness in your PGM
50 or PPM output.
51
52
54 pamdepth(1), rawtopgm(1), rawtoppm(1), pnm(1)
55
56
57
58netpbm documentation 16 March 2002 Pamendian User Manual(0)