multimg

multiply images pixel-by-pixel

usage: multimg input.bw low_map high_map [...] output.bw output_low_map output_high_map

multimg maps the [0,255] greyscale range of each input image linearly onto the interval of real numbers [low_map, high_map] whose bounds are specified in the parameters immediately following the filename. Each filename has its own pair of bounds; thus the parameters are a series of triples. After the input images have been converted to real numbers, they're multiplied pointwise. The product, an image whose pixels are reals, is mapped back to discrete greyscale values using the filename and real bounds specified in the rightmost triplet of parameters.

A degenerate case of multimg can be used to darken or lighten an image: multimg in.bw 0 1 out.bw 0 N, where N is any floating-point number, creates an image scaled by 1/N.

Author: Matthew Belmonte