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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Rawtoppm User Manual</TITLE></HEAD>
<BODY>
<H1>rawtoppm</H1>
Updated: 06 February 1991
<BR>
<A HREF="#index">Table Of Contents</A>
<A NAME="lbAB"> </A>
<H2>NAME</H2>
rawtoppm - convert a stream of raw RGB bytes to a PPM image
<A NAME="lbAC"> </A>
<H2>SYNOPSIS</H2>
<B>rawtoppm</B>
[<B>-headerskip</B> <I>N</I>]
[<B>-rowskip</B> <I>N</I>]
[
<B>-rgb</B>|<B>-rbg</B>|<B>-grb</B>
|<B>-gbr</B>|<B>-brg</B>|<B>-bgr</B>
]
[<B>-interpixel</B>|<B>-interrow</B>]
<I>width</i> <i>height</I>
[<I>imagedata</I>]
<A NAME="lbAD"> </A>
<H2>DESCRIPTION</H2>
<p>This program is part of <a href="index.html">Netpbm</a>.
<p><b>rawtoppm</b> reads raw RGB bytes as input and produces a PPM
image as output. The input file is just RGB bytes. You have to
specify the width and height on the command line, since the program
obviously can't get them from the file. <b>rawtoppm</b> assumes the
maxval of the input samples is 255, and makes the maxval of the output
PPM 255.
<p><b>rawtoppm</b> assumes the pixels come top first in the input stream.
If they are actually bottom first, the resulting PPM is upside down, so
run it through <b>pamflip -tb</b>.
<A NAME="lbAE"> </A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-headerskip</B>
<DD>Skip over this many bytes at the beginning of the input stream.
Use this option when the input has some kind of header followed by
a raster suitable for <b>rawtoppm</b>.
<DT><B>-rowskip</B>
<DD>Skip this many bytes at the end of each row of the raster. (Some
input streams have padding at the end of rows).
<DT><B>-rgb -rbg -grb -gbr -brg -bgr</B>
<DD>This option specifies the order of the color components for each
pixel. The default is <B>-rgb</B>.
<DT><B>-interpixel -interrow</B>
<DD>These options specify how the colors are interleaved. The default
is <B>-interpixel</B>, meaning interleaved by pixel. A byte of red, a
byte of green, and a byte of blue, or whatever color order you
specified. <B>-interrow</B> means interleaved by row - a row of red,
a row of green, a row of blue, assuming standard rgb color order. An
<B>-interplane</B> option - all the red pixels, then all the green,
then all the blue - would be an obvious extension, but is not
implemented. You could get the same effect by splitting the file into
three parts (perhaps using <b>dd</b>), turning each part into a PGM
file with <b>rawtopgm</b>, and then combining them with <b>rgb3toppm</b>.
</DL>
<A NAME="lbAF"> </A>
<H2>SEE ALSO</H2>
<A HREF="ppm.html">ppm</A>,
<A HREF="rawtopgm.html">rawtopgm</A>,
<A HREF="rgb3toppm.html">rgb3toppm</A>,
<A HREF="pamflip.html">pamflip</A>
<A NAME="lbAG"> </A>
<H2>AUTHOR</H2>
Copyright (C) 1991 by Jef Poskanzer.
<HR>
<A NAME="index"> </A>
<H2>Table Of Contents</H2>
<UL>
<LI><A HREF="#lbAB">NAME</A>
<LI><A HREF="#lbAC">SYNOPSIS</A>
<LI><A HREF="#lbAD">DESCRIPTION</A>
<LI><A HREF="#lbAE">OPTIONS</A>
<LI><A HREF="#lbAF">SEE ALSO</A>
<LI><A HREF="#lbAG">AUTHOR</A>
</UL>
</BODY>
</HTML>
|