summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man1/rawtoppm.1
blob: 7c7e9938152250e776f77417fcc3876ce14a9378 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
\
.\" 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 "Rawtoppm User Manual" 0 "06 February 1991" "netpbm documentation"

.SH NAME

rawtoppm - convert a stream of raw RGB bytes to a PPM image

.UN synopsis
.SH SYNOPSIS

\fBrawtoppm\fP

[\fB-headerskip\fP \fIN\fP]

[\fB-rowskip\fP \fIN\fP]

[
\fB-rgb\fP|\fB-rbg\fP|\fB-grb\fP
|\fB-gbr\fP|\fB-brg\fP|\fB-bgr\fP
]

[\fB-interpixel\fP|\fB-interrow\fP] \fIwidth\fP \fIheight\fP

[\fIimagedata\fP]

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBrawtoppm\fP 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.  \fBrawtoppm\fP assumes the
maxval of the input samples is 255, and makes the maxval of the output
PPM 255.  
.PP
\fBrawtoppm\fP 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 \fBpamflip -tb\fP.

.UN options
.SH OPTIONS
.PP
In addition to the options common to all programs based on libnetpbm
(most notably \fB-quiet\fP, see 
.UR index.html#commonoptions
 Common Options
.UE
\&), \fBrawtoppm\fP recognizes the following
command line options:


.TP
\fB-headerskip\fP
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 \fBrawtoppm\fP.

.TP
\fB-rowskip\fP
Skip this many bytes at the end of each row of the raster.  (Some
input streams have padding at the end of rows).

.TP
\fB-rgb -rbg -grb -gbr -brg -bgr\fP
This option specifies the order of the color components for each
pixel.  The default is \fB-rgb\fP.

.TP
\fB-interpixel -interrow\fP
These options specify how the colors are interleaved.  The default
is \fB-interpixel\fP, meaning interleaved by pixel.  A byte of red, a
byte of green, and a byte of blue, or whatever color order you
specified.  \fB-interrow\fP means interleaved by row - a row of red,
a row of green, a row of blue, assuming standard rgb color order.  An
\fB-interplane\fP 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 \fBdd\fP), turning each part into a PGM
file with \fBrawtopgm\fP, and then combining them with \fBrgb3toppm\fP.



.UN seealso
.SH SEE ALSO
.BR "ppm" (5)\c
\&, 
.BR "rawtopgm" (1)\c
\&, 
.BR "rgb3toppm" (1)\c
\&, 
.BR "pamflip" (1)\c
\&

.UN author
.SH AUTHOR

Copyright (C) 1991 by Jef Poskanzer.
.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/rawtoppm.html
.PP