Scripts for Netpbm Multi-Image Streams

foreachpam and foreachpnm

A lot of the Netpbm tools can work with multi-image streams, but not all. The scripts foreachpam and foreachpnm use pamsplit resp. pnmsplit to get the images from the stream. The program supplied to foreachp[an]m is invoked for each of the images.

Usage:

foreachpam PROGRAM [PROGRAMARGUMENTS] < IMAGESTREAM
foreachpnm PROGRAM [PROGRAMARGUMENTS] < IMAGESTREAM

The image stream must be provided via stdin. The output is sent to stdout.

pnmcat-stream

pnmcat does not work with multi-image streams, but invoking it with one image each as done by foreachp[an]m does not provide the desired result. pnmcat-stream addresses this problem by splitting the image stream provided on stdin into single image files and invoking pnmcat with those files as arguments (additional files can be specified on the command line as arguments to pnmcat-stream). The output is sent to stdout.

Usage:

pnmcat-stream -lr|-tb [OPTION(S)] [FILE(S)] < IMAGESTREAM

Downloads

The scripts are released under the MIT License.

foreachpam
foreachpnm
pnmcat-stream


back to my homepage.