This program is part of Netpbm.
pamgetcolor prints the average colors of a set of circular regions in the input image.
You specify a region as a positional argument of the form column,row[:label], where column and row are the coordinates of the center of the circle (first row of pixels is row 0; leftmost column of pixels is column 0), and label an optional label that pamgetcolor shall display to identify that region in its output. All regions have he same radius, specified by the -radius option. The region centers must lie within the image, but part of a region may fall outside the image; pamgetcolor considers only the part that is within the image in calculations.
pamgetcolor 10,14 -infile test.ppm
To read the colors of three pixels in the default format, assigning a label to each pixel:
pamgetcolor 10,10:topleft 100,100:middle 200,200:bottomright -infile test.ppm
To read with 16-bit precision the average color in the circle with a radius of four pixels and the center at (100,100):
pamgetcolor -format int:65535 -radius 4 100,100 -infile test.ppm
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pamgetcolor recognizes the following command line options:
This argument is of the form formatId[:param], where formatId specifies the format and param is a positive integer parameter that, depending on formatId, indicates either precision or normalization. The following values are possible for formatId:
If you don't specify this option, pamgetcolor reads the image from Standard Input.
This program was first submitted by Anton Shepelev (anton.txt@gmail.com).
This program was new in Netpbm 10.83 (June 2018).