pamslice
extract a single row or column from a Netpbm image as text
TLDR
SYNOPSIS
pamslice {-row=rownumber | -column=columnnumber} [-plane=planenumber] [-xmgr] [imagefile]
DESCRIPTION
pamslice extracts one line of pixels (a row or column) from a Netpbm image and prints the sample values as ASCII decimal numbers. The first number on each output line is the position index (column number for row slices, row number for column slices), followed by the sample values for each plane.This is useful for generating profile data from images, such as plotting intensity values along a scanline for image analysis. The output can be fed directly into plotting tools like xmgr using the -xmgr option.Either -row or -column must be specified, but not both.
PARAMETERS
IMAGEFILE
Input PAM, PBM, PGM, or PPM image file. Reads from standard input if omitted.-row=N
Extract row N as a horizontal slice. Rows are numbered from the top starting with 0.-column=N
Extract column N as a vertical slice. Columns are numbered from the left starting with 0.-plane=N
Restrict output to a single color plane. For PPM images: 0=red, 1=green, 2=blue. Omit for all planes.-xmgr
Format output as input for the xmgr plotting program by adding header information.
CAVEATS
Part of Netpbm. Output is plain text only, not an image. Row and column numbering starts at 0.
HISTORY
pamslice is part of the Netpbm toolkit for image manipulation and analysis. It was added as a tool for extracting profile data from images.
