\ .\" 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 "Pamgetcolor User Manual" 1 "18 May 2018" "netpbm documentation" .SH NAME pamgetcolor - display the average colors from specified regions in an image. .UN synopsis .SH SYNOPSIS \fBpamgetcolor\fP [\fB-format\fP \fIformat\fP] [\fB-radius\fP \fIradius\fP] [\fB-linear\fP] [\fB-infile\fP \fIpamfile\fP] \fIregion1\fP [\fIregion2\fP ...] .UN description .SH DESCRIPTION .PP This program is part of .BR "Netpbm" (1)\c \&. .PP \fBpamgetcolor\fP prints the average colors of a set of circular regions in the input image. .PP You specify a region as a positional argument of the form \fIcolumn\fP,\fIrow\fP[:\fIlabel\fP], where \fIcolumn\fP and \fIrow\fP are the coordinates of the center of the circle (first row of pixels is row 0; leftmost column of pixels is column 0), and \fIlabel\fP an optional label that \fBpamgetcolor\fP shall display to identify that region in its output. All regions have he same radius, specified by the \fB-radius\fP option. The region centers must lie within the image, but part of a region may fall outside the image; \fBpamgetcolor\fP considers only the part that is within the image in calculations. .UN examples .SH EXAMPLES To read the color of the pixel at location (10,14) in the default format: .nf \f(CW pamgetcolor 10,14 -infile test.ppm \fP .fi .PP To read the colors of three pixels in the default format, assigning a label to each pixel: .nf \f(CW pamgetcolor 10,10:topleft 100,100:middle 200,200:bottomright -infile test.ppm \fP .fi .PP To read with 16-bit precision the average color in the circle with a radius of four pixels and the center at (100,100): .nf \f(CW pamgetcolor -format int:65535 -radius 4 100,100 -infile test.ppm \fP .fi .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 \&), \fBpamgetcolor\fP recognizes the following command line options: .TP \fB-format\fP This specifies the format in which to output the colors. The output is always a .UR libppm.html#colorname Netpbm color specification .UE \&; this format tells which of the various specifications for the same color the program uses. .sp This argument is of the form \fIformatId\fP[:\fIparam\fP], where \fIformatId\fP specifies the format and \fIparam\fP is a positive integer parameter that, depending on \fIformatId\fP, indicates either precision or normalization. The following values are possible for \fIformatId\fP: .TP int Samples are decimal integers normalized to the maxval specified by \fIparam\fP. Example: \fBrgb-255:255/128/64\fP This format is the default, with a maxval of 255. .TP norm Samples are floating point numbers normalized to unity. E.g. \fBrgbi:1.0/0.5/.25\fP \fIparam\fP specifies precision as the number of digits in the fractional part. .TP x11 Samples are hexadecimal numbers with \fIparam\fP digits, e.g. \fBrgb:01/ff/8000\fP .TP \fB-radius\fP sets the radius of the regions. A value of zero causes \fBpamgetcolor\fP to measure a single pixel and is the default. .TP \fB-infile\fP This specifies the Netpbm file to analyze. .sp If you don't specify this option, \fBpamgetcolor\fP reads the image from Standard Input. .TP \fB-linear\fP This tells \fBpamgetcolor\fP to work with the intensity-linear variation of Netpbm images where the samples are proportional to light intensity rather than to brightness, as in true (gamma-adjusted) Netpbm formats. .UN seealso .SH SEE ALSO .PP .BR "pnmcolormap" (1)\c \&, .UN author .SH AUTHOR .PP This program was first submitted by Anton Shepelev (\fIanton.txt@gmail.com\fP). .UN history .SH HISTORY .PP This program was new in Netpbm 10.83 (June 2018). .UN index .SH Table Of Contents .IP \(bu .UR #synopsis SYNOPSIS .UE \& .IP \(bu .UR #description DESCRIPTION .UE \& .IP \(bu .UR #examples EXAMPLES .UE \& .IP \(bu .UR #options OPTIONS .UE \& .IP \(bu .UR #seealso SEE ALSO .UE \& .IP \(bu .UR #author AUTHOR .UE \& .IP \(bu .UR #history HISTORY .UE \& .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/pamgetcolor.html .PP