about summary refs log tree commit diff
path: root/pamslice.html
blob: 79787018e5af615906027499cbf8159265f39b6d (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
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
112
113
114
115
116
117
118
119
120
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD><TITLE>Pamslice User Manual</TITLE></HEAD>
<BODY>
<H1>pamslice</H1>
Updated: 8 February 2010
<BR>
<A HREF="#index">Table Of Contents</A>

<H2>NAME</H2>
pamslice - extract one line of values out of a Netpbm image

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

<B>pamslice</B>
{<B>-row=</B><i>rownumber</i> | <B>-column=</B><i>columnnumber</i>}
[<B>-plane=</b><i>planenumber</i>]
[<I>imagefile</I>]

<?makeman .SH OPTION USAGE ?>
<P>All options can be abbreviated to their shortest unique prefix.
You may use two hyphens instead of one.  You may separate an option
name and its value with white space instead of an equals sign.

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

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

<p><b>pamslice</b> extracts one line of tuples (pixels) out of a
Netpbm image and prints their values in a table.  A line means a row
or column.  It shows you a one-dimensional cross section of a
two-dimensional image.  (With the <b>-plane</b> option, it can be
thought of as a one-dimensional cross-section of a three-dimensional
image).

<p>The table has one line per tuple, consisting of blank-separated
ASCII decimal numbers.  The first number is the column number if you
specified a row slice or the row number if you specified a column
slice.  The rest of the numbers are the sample values in plane number
order.  For a PBM or PGM input, there is only one plane.  For a PPM
input, Plane 0 is red, Plane 1 is green, and Plane 2 is blue.  See the
specifications of the image formats for details on exactly what these
numbers mean.

If you want to see all the pixels in a PPM, PGM, or PBM image in ASCII
decimal, <b>pnmtopnm -plain</b> is a good way to do that.

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

<DL COMPACT>
<DT><B>-row=</B><i>rownumber</i>
<DD>
     This indicates that the slice is to be horizontal -- i.e. one row of the
     image -- and indicates which row.  Rows are numbered from the top
     starting with 0.

     <P>You cannot specify both <b>-row</b> and <b>-column</b>.

<DT><B>-column=</B><i>colnumber</i>
<DD>
     This indicates that the slice is to be vertical -- i.e. one column of the
     image -- and indicates which column.  Columns are numbered from the left
     starting with 0.

     <P>You cannot specify both <b>-row</b> and <b>-column</b>.

<DT><B>-plane=</B><i>planenumber</i>
<DD>
     This specifies that you are interested in only one plane of the image
     and which one.  Planes are numbered from 0 and have meanings that vary
     on the type of image.  In a PPM image, Plane 0 is red, Plane 1 is
     green, and Plane 2 is blue.

     <p>If you don't specify <b>-plane</b>, you get all the planes -- each
     line of output has multiple numbers in addition to the sequence number.
     If you do specify <b>-plane</b>, each line of output contains one
     number in addition to the sequence number.

<DT><B>-xmgr</B>
<DD>
     This option causes <b>pamslice</b> to format the output as input for a
     <b>xmgr</b> so you can plot it.  The only difference this option makes
     is that it adds header information to the beginning of the output.

</DL>

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

<A HREF="pamcut.html">pamcut</A>
<A HREF="pnmtopnm.html">pnmtopnm</A>
<A HREF="pamchannel.html">pamchannel</A>
<A HREF="pnm.html">pnm</A>

<H2 id="history">HISTORY</H2>

<P><b>pamslice</b> replaced <b>pgmslice</b> in Netpbm 10.3 (June 2002).
It was backward compatible, but worked on Netpbm images other than PGM and
PBM and added the <b>-plane</b> and <b>-xmgr</b> options.

<H2 id="author">AUTHOR</H2>

<P>Jos Dingjan &lt;<A
HREF="mailto:jos@tuatha.org">jos@tuatha.org</A>&gt; wrote
<b>pgmslice</b> after being unable to find the source code to Marco
Beijersbergen's program with the same name.  Bryan Henderson converted it
to <b>pamslice</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>
<LI><A HREF="#history">HISTORY</A>
<LI><A HREF="#author">AUTHOR</A>
</UL>
</BODY>
</HTML>