summary refs log tree commit diff
path: root/pamendian.html
blob: 286f5411102abe5bae1e99ea586f5dd7a6600ffa (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Pamendian User Manual</title></head>
<body>
<h1>pamendian</h1>
Updated: 16 March 2002
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>

pamendian - reverse endianness of a Netpbm image

<h2 id="synopsis">SYNOPSIS</h2>

<b>pamendian</b>

<h2 id="description">DESCRIPTION</h2>

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

<p>All Netpbm formats that have samples in pure binary format with multiple
bytes are defined to have them in big endian (most significant byte first)
order.  However, there exist variations on these formats, primarily developed
before official multibyte Netpbm formats existed, that are identical to 
Netpbm formats in every respect except that samples are in little endian
(least significant byte first) order.

<p><b>pamendian</b> reverses the byte order of the sample to convert
between the two formats.  If the input is true PAM, PGM, or PPM, the
output is the little endian variation on that format, and vice versa.

<p>The X Window System viewer <b>xv</b> expects the little endian variation
of PGM and PPM.

<p>Programs that come with the Independent Jpeg Group's JPEG library
are known to use the little endian variation of PGM and PPM.

<p>The reason some programs use this variant is that at one time
during Netpbm's <a
href="http://netpbm.sourceforge.net/history.html">dark age</a>, there
was a version of Netpbm around that used it.  But it was never
formally specified.

<p>This program takes input only on Standard Input.  Its output is
always on Standard Output.

<p>You should never have to use this program with images generated by
programs in the Netpbm package or programs that use the Netpbm
libraries.  If you do, that probably means something needs to be fixed
in those programs.  The Netpbm converter for any graphics format that
represents numbers in little endian form should properly reverse the
bytes to create correct Netpbm output.

<p>If you create a Netpbm image from a generic stream of samples,
using <b>rawtopgm</b> or <b>rawtoppm</b>, use options on those
programs to declare the endianness of your input, thus creating
correct endianness in your PGM or PPM output.

<h2 id="options">OPTIONS</h2>

<p>There are no command line options defined specifically
for <b>pamendian</b>, but it recognizes the options common to all
programs based on libnetpbm (See <a href="index.html#commonoptions">
Common Options</a>.)

<h2 id="seealso">SEE ALSO</h2>

<b><a href="pamdepth.html">pamdepth</a></b>,
<b><a href="rawtopgm.html">rawtopgm</a></b>,
<b><a href="rawtoppm.html">rawtoppm</a></b>,
<b><a href="pnm.html">pnm</a></b>

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#seealso">SEE ALSO</a>
</ul>
</body>
</html>