Pamfunc UserManual(0)Pamfunc UserManual(0)

pamfunc - Apply simple arithmetic functions to a Netpbm image

pamfunc{-multiplier=realnum|-divisor=realnum|-adder=integer|-subtractor=integer|-min=wholenum|-max=wholenum} [filespec] All options can be abbreviated to their shortest unique prefix. You may use two hyphens instead of one. You may separate an option name and its value with white space instead of an equals sign.

This program is part ofNetpbm(1).pamfuncreads a Netpbm image as input and produces a Netpbm image as output, with the same format, maxval, and dimensions as the input.pamfuncapplies a simple transfer function to each sample in the input to generate the corresponding sample in the output. The options deter- mine what function.pamarithis the same thing, except only for PNM images, for binary functions -- it takes two PNM images as input and applies a specified simple arithmetic function (e.g. addition) on pairs of samples from the two to produce the single output image.

-multiplier=realnumThis option makes the transfer function that of multiplying byrealnum.realnummust be nonnegative. If the result is greater than the image maxval, it is clipped to the max- val. Where the input is a PGM or PPM image, this has the effect of dimming or brightening it. For a different kind of bright- ening, seeppmbrighten(1)andppmflash(1)Also, seeppmdim(1),whichdoesthesame thing aspamfunc-multiplieron a PPM image with a multiplier between 0 and 1, except it uses integer arithmetic, so it may be faster. Andppmfade(1)cangenerateawhole sequence of images of brightness declining to black or increasing to white, if that’s what you want.-divisor=realnumThis option makes the transfer function that of dividing byrealnum.realnummust be nonnegative. If the result is greater than the image maxval, it is clipped to the max- val. This is the same function as you would get with-multiplier, specifying the multiplicative inverse ofrealnum.-adder=integerThis option makes the transfer function that of addingwholenum. If the result is greater than the image maxval, it is clipped to the maxval. If it is less than zero, it is clipped to zero. Note that in mathematics, this entity is called an ’addend,’ and an ’adder’ is a snake. We use ’adder’ because it makes more sense.-subtractor=integerThis option makes the transfer function that of subtractingwholenum. If the result is greater than the image maxval, it is clipped to the maxval. If it is less than zero, it is clipped to zero. Note that in mathematics, this entity is called a ’subtrahend’ rather than a ’subtractor.’ We use ’subtractor’ because it makes more sense. This is the same function as you would get with-multiplier, specifying the negative ofinteger.-min=wholenumThis option makes the transfer function that of taking the maximum of the argument andwholenum. I.e the minimum value in the output will bewholenum. Ifwholenumis greater than the maxval, though, every sam- ple in the output will be maxval.-max=wholenumThis option makes the transfer function that of taking the minimum of the argument andwholenum. I.e the maximum value in the output will bewholenum. Ifwholenumis greater than the maxval, the function is idempotent -- the output is identical to the input.

ppmdim(1),ppmbrighten(1),pnmdepth(1),pamarith(1),pamsummcol(1),pamsumm(1),ppmfade(1),pam(1),pnm(1),

This program was added to Netpbm in Release 10.3 (June 2002). netpbm documentation June 2002 Pamfunc UserManual(0)

Man(1) output converted with man2html