| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pamendian User Manual" 1 "16 March 2002" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
|
| 10 |
pamendian - reverse endianness of a Netpbm image |
| 11 |
|
| 12 |
.UN synopsis |
| 13 |
.SH SYNOPSIS |
| 14 |
|
| 15 |
\fBpamendian\fP |
| 16 |
|
| 17 |
.UN description |
| 18 |
.SH DESCRIPTION |
| 19 |
.PP |
| 20 |
This program is part of |
| 21 |
.BR "Netpbm" (1)\c |
| 22 |
\&. |
| 23 |
.PP |
| 24 |
All Netpbm formats that have samples in pure binary format with multiple |
| 25 |
bytes are defined to have them in big endian (most significant byte first) |
| 26 |
order. However, there exist variations on these formats, primarily developed |
| 27 |
before official multibyte Netpbm formats existed, that are identical to |
| 28 |
Netpbm formats in every respect except that samples are in little endian |
| 29 |
(least significant byte first) order. |
| 30 |
.PP |
| 31 |
\fBpamendian\fP reverses the byte order of the sample to convert |
| 32 |
between the two formats. If the input is true PAM, PGM, or PPM, the |
| 33 |
output is the little endian variation on that format, and vice versa. |
| 34 |
.PP |
| 35 |
The X Window System viewer \fBxv\fP expects the little endian variation |
| 36 |
of PGM and PPM. |
| 37 |
.PP |
| 38 |
Programs that come with the Independent Jpeg Group's JPEG library |
| 39 |
are known to use the little endian variation of PGM and PPM. |
| 40 |
.PP |
| 41 |
The reason some programs use this variant is that at one time |
| 42 |
during Netpbm's |
| 43 |
.BR "dark age" (1)\c |
| 44 |
\&, there |
| 45 |
was a version of Netpbm around that used it. But it was never |
| 46 |
formally specified. |
| 47 |
.PP |
| 48 |
This program takes input only on Standard Input. Its output is |
| 49 |
always on Standard Output. |
| 50 |
.PP |
| 51 |
You should never have to use this program with images generated by |
| 52 |
programs in the Netpbm package or programs that use the Netpbm |
| 53 |
libraries. If you do, that probably means something needs to be fixed |
| 54 |
in those programs. The Netpbm converter for any graphics format that |
| 55 |
represents numbers in little endian form should properly reverse the |
| 56 |
bytes to create correct Netpbm output. |
| 57 |
.PP |
| 58 |
If you create a Netpbm image from a generic stream of samples, |
| 59 |
using \fBrawtopgm\fP or \fBrawtoppm\fP, use options on those |
| 60 |
programs to declare the endianness of your input, thus creating |
| 61 |
correct endianness in your PGM or PPM output. |
| 62 |
|
| 63 |
.UN options |
| 64 |
.SH OPTIONS |
| 65 |
.PP |
| 66 |
There are no command line options defined specifically |
| 67 |
for \fBpamendian\fP, but it recognizes the options common to all |
| 68 |
programs based on libnetpbm (See |
| 69 |
.UR index.html#commonoptions |
| 70 |
Common Options |
| 71 |
.UE |
| 72 |
\&.) |
| 73 |
|
| 74 |
.UN seealso |
| 75 |
.SH SEE ALSO |
| 76 |
.BR "pamdepth" (1)\c |
| 77 |
\&, |
| 78 |
.BR "rawtopgm" (1)\c |
| 79 |
\&, |
| 80 |
.BR "rawtoppm" (1)\c |
| 81 |
\&, |
| 82 |
.BR "pnm" (1)\c |
| 83 |
\& |
| 84 |
.SH DOCUMENT SOURCE |
| 85 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 86 |
source. The master documentation is at |
| 87 |
.IP |
| 88 |
.B http://netpbm.sourceforge.net/doc/pamendian.html |
| 89 |
.PP |