summaryrefslogtreecommitdiffstats
path: root/upstream/mageia-cauldron/man1/pamfind.1
blob: adaea428bdc632823a23a93640252971dae77928 (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
\
.\" 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 "Pamfind User Manual" 0 "13 March 2019" "netpbm documentation"

.SH NAME
pamfind - Print the locations of all tuples of a certain value in an image

.UN synopsis
.SH SYNOPSIS
\fBpamfind\fP
{
\fB-target=\fP\fIsample0\fP\fB,\fP\fIsample1\fP\fB,\fP ... |
\fB-color=\fP\fIcolor\fP
}
[\fB-machine\fP]
[\fIimagefile\fP]
.PP
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.

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBpamfind\fP reads a Netpbm image (PNM or PAM) and prints a list of all
the locations (row and column) of the tuples that have a value you specify.
For example, you can list all the places that a visual image is red.
.PP
You can specify the value in actual decimal sample values with
a \fB-target\fP option or as a color with \fB-color\fP.  If you
specify \fB-color\fP, the program fails if the input image does not have
depth 3.  If it has depth 3 but the tuples aren't actually colors, you get
results as if they are.
.PP
To do the opposite, see what tuple is at a given location, use
\fBpamcut\fP and \fBpamtable\fP:

.nf
    
      $ pamcut -left=5 -top=7 -width=1 -height=1 | pamtable
    

.fi
.PP
\fBppmcolormask\fP also finds all the tuples of a certain value, at least
in visual images, but instead of printing their coordinates, it generates a
mask image, which you can use to visualize where those tuples are or as input
to another program.


.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
\&), \fBpamfind\fP recognizes the following
command line options:



.TP
\fB-target=\fP\fIsample0\fP\fB,\fP\fIsample1\fP\fB,\fP ... |
This specifies the tuple value to find.  You specify the sample values in
order, and must specify the proper number of sample values for the depth of
the image (e.g. 3 if it is a color image).
.sp
You must specify exactly one of \fB-target\fP and \fB-color\fP.

.TP
\fB-color=\fP\fIcolor\fP
This is the color to find, assuming the image is a color visual image.
.sp
\fIcolor\fP is as described for the 
.UR libnetpbm_image.html#colorname
argument of the \fBpnm_parsecolor()\fP library routine
.UE
\&.
.sp
You must specify exactly one of \fB-target\fP and \fB-color\fP.

.TP
\fB-machine\fP
This makes the output more convenient for a machine to use, while
  less convenient for a human.  \fBpamfind\fP reports the same information
  as with no options.
.sp
This option was new in Netpbm 10.87 (March 2020).



.UN seealso
.SH SEE ALSO
.BR "pamdepth" (1)\c
\&,
.BR "pamgetcolor" (1)\c
\&,
.BR "ppmhist" (1)\c
\&,
.BR "ppmcolormask" (1)\c
\&,
.BR "pamcut" (1)\c
\&,
.BR "pamtable" (1)\c
\&,
.BR "pam" (1)\c
\&

.UN history
.SH HISTORY
.PP
\fBpamfind\fP was added to Netpbm in Release 10.86 (March 2019).
.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/pamfind.html
.PP