diff --git a/pages/common/pnmmargin.md b/pages/common/pnmmargin.md new file mode 100644 index 000000000..2e5e21e30 --- /dev/null +++ b/pages/common/pnmmargin.md @@ -0,0 +1,12 @@ +# pnmmargin + +> Add a border to a PNM image. +> More information: . + +- Add a border of the specified size to a PNM image: + +`pnmmargin {{size}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` + +- Specify the color of the border: + +`pnmmargin -color {{color}} {{size}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` diff --git a/pages/common/pnmmontage.md b/pages/common/pnmmontage.md new file mode 100644 index 000000000..a51f7ea7d --- /dev/null +++ b/pages/common/pnmmontage.md @@ -0,0 +1,20 @@ +# pnmmontage + +> Create a montage from multiple PNM images. +> More information: . + +- Produce a packing of the specified images: + +`pnmmontage {{path/to/image1.pnm path/to/image2.pnm ...}} > {{path/to/output.pnm}}` + +- Specify the quality of the packing (Note: larger values produce smaller packings but take longer to compute.): + +`pnmmontage -{{0..9}} {{path/to/image1.pnm path/to/image2.pnm ...}} > {{path/to/output.pnm}}` + +- Produce a packing that is not larger than `p` percent of the optimal packing: + +`pnmmontage -quality {{p}} {{path/to/image1.pnm path/to/image2.pnm ...}} > {{path/to/output.pnm}}` + +- Write the positions of the input files within the packed image to a machine-readable file: + +`pnmmontage -data {{path/to/datafile}} {{path/to/image1.pnm path/to/image2.pnm ...}} > {{path/to/output.pnm}}` diff --git a/pages/common/pnmnlfilt.md b/pages/common/pnmnlfilt.md new file mode 100644 index 000000000..668bc07c2 --- /dev/null +++ b/pages/common/pnmnlfilt.md @@ -0,0 +1,16 @@ +# pnmnlfilt + +> Apply a non-linear filter onto a PNM image. +> More information: . + +- Apply the "alpha trimmed mean" filter with the specified alpha and radius values onto the PNM image: + +`pnmnlfilt {{0.0..0.5}} {{radius}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` + +- Apply the "optimal estimation smoothing" filter with the specified noise threshold and radius onto the PNM image: + +`pnmnlfilt {{1.0..2.0}} {{radius}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` + +- Apply the "edge enhancement" filter with the specified alpha and radius onto the PNM image: + +`pnmnlfilt {{-0.9..(-0.1)}} {{radius}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` diff --git a/pages/common/pnmnorm.md b/pages/common/pnmnorm.md new file mode 100644 index 000000000..69185f9bc --- /dev/null +++ b/pages/common/pnmnorm.md @@ -0,0 +1,21 @@ +# pnmnorm + +> Normalize the contrast in a PNM image. +> See also: `pnmhisteq`. +> More information: . + +- Force the brightest pixels to be white, the darkest pixels to be black and spread out the ones in between linearly: + +`pnmnorm {{path/to/image.pnm}} > {{path/to/output.pnm}}` + +- Force the brightest pixels to be white, the darkest pixels to be black and spread out the ones in between quadratically such that pixels with a brightness of `n` become 50 % bright: + +`pnmnorm -midvalue {{n}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` + +- Keep the pixels' hue, only modify the brightness: + +`pnmnorm -keephues {{path/to/image.pnm}} > {{path/to/output.pnm}}` + +- Specify a method to calculate a pixel's brightness: + +`pnmnorm -{{luminosity|colorvalue|saturation}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` diff --git a/pages/common/pnmpad.md b/pages/common/pnmpad.md new file mode 100644 index 000000000..fff645210 --- /dev/null +++ b/pages/common/pnmpad.md @@ -0,0 +1,21 @@ +# pnmpad + +> Add borders to a PNM image. +> See also: `pnmmargin`, `pamcut`, `pamcomp`. +> More information: . + +- Add borders of the specified sizes to the image: + +`pnmpad -left {{100}} -right {{150}} -top {{123}} -bottom {{456}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` + +- Pad the image to the specified size: + +`pnmpad -width {{1000}} -height {{500}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` + +- Pad the width of the image to the specified size, controlling the ratio between right and left padding: + +`pnmpad -width {{1000}} -halign {{0.7}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` + +- Pad the width of the image using the specified color: + +`pnmpad -width {{1000}} -color {{red}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` diff --git a/pages/common/pnmpaste.md b/pages/common/pnmpaste.md new file mode 100644 index 000000000..d5489c215 --- /dev/null +++ b/pages/common/pnmpaste.md @@ -0,0 +1,16 @@ +# pnmpaste + +> Paste a PNM image into another PNM image. +> More information: . + +- Paste a PNM image into another PNM image at the specified coordinates: + +`pnmpaste {{x}} {{y}} {{path/to/image1.pnm}} {{path/to/image2.pnm}} > {{path/to/output.pnm}}` + +- Paste the image read from `stdin` into the specified image: + +`{{command}} | pnmpaste {{x}} {{y}} {{path/to/image.pnm}} > {{path/to/output.pnm}}` + +- Combine the overlapping pixels by the specified boolean operation, where white pixels represent `true` while black pixels represent `false`: + +`pnmpaste -{{and|nand|or|nor|xor|xnor}} {{x}} {{y}} {{path/to/image1.pnm}} {{path/to/image2.pnm}} > {{path/to/output.pnm}}`