summaryrefslogtreecommitdiffstats
path: root/upstream/mageia-cauldron/man1/pamendian.1
blob: 9e1855732c50ca237108ea5d0b5d8e158ae883d7 (plain)
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
84
85
86
87
88
89
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it!  If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Pamendian User Manual" 0 "16 March 2002" "netpbm documentation"

.SH NAME

pamendian - reverse endianness of a Netpbm image

.UN synopsis
.SH SYNOPSIS

\fBpamendian\fP

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
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.
.PP
\fBpamendian\fP 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.
.PP
The X Window System viewer \fBxv\fP expects the little endian variation
of PGM and PPM.
.PP
Programs that come with the Independent Jpeg Group's JPEG library
are known to use the little endian variation of PGM and PPM.
.PP
The reason some programs use this variant is that at one time
during Netpbm's
.BR "dark age" (1)\c
\&, there
was a version of Netpbm around that used it.  But it was never
formally specified.
.PP
This program takes input only on Standard Input.  Its output is
always on Standard Output.
.PP
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.
.PP
If you create a Netpbm image from a generic stream of samples,
using \fBrawtopgm\fP or \fBrawtoppm\fP, use options on those
programs to declare the endianness of your input, thus creating
correct endianness in your PGM or PPM output.

.UN options
.SH OPTIONS
.PP
There are no command line options defined specifically
for \fBpamendian\fP, but it recognizes the options common to all
programs based on libnetpbm (See 
.UR index.html#commonoptions
 Common Options
.UE
\&.)

.UN seealso
.SH SEE ALSO
.BR "pamdepth" (1)\c
\&,
.BR "rawtopgm" (1)\c
\&,
.BR "rawtoppm" (1)\c
\&,
.BR "pnm" (1)\c
\&
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source.  The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/pamendian.html
.PP