pnmmargin, pnmmontage, pnmnlfilt, pnmnorm, pnmpad, pnmpaste: add pages (#12187)

* pnmmargin, pnmmontage, pnmnlfilt, pnmnorm, pnmpad, pnmpaste: add pages

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
pull/23/head
Juri Dispan 2024-02-09 14:53:54 +01:00 committed by GitHub
parent 2df868402a
commit 95e6753d3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 106 additions and 0 deletions

12
pages/common/pnmmargin.md Normal file
View File

@ -0,0 +1,12 @@
# pnmmargin
> Add a border to a PNM image.
> More information: <https://netpbm.sourceforge.net/doc/pnmmargin.html>.
- 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}}`

View File

@ -0,0 +1,20 @@
# pnmmontage
> Create a montage from multiple PNM images.
> More information: <https://netpbm.sourceforge.net/doc/pnmmontage.html>.
- 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}}`

16
pages/common/pnmnlfilt.md Normal file
View File

@ -0,0 +1,16 @@
# pnmnlfilt
> Apply a non-linear filter onto a PNM image.
> More information: <https://netpbm.sourceforge.net/doc/pnmnlfilt.html>.
- 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}}`

21
pages/common/pnmnorm.md Normal file
View File

@ -0,0 +1,21 @@
# pnmnorm
> Normalize the contrast in a PNM image.
> See also: `pnmhisteq`.
> More information: <https://netpbm.sourceforge.net/doc/pnmnorm.html>.
- 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}}`

21
pages/common/pnmpad.md Normal file
View File

@ -0,0 +1,21 @@
# pnmpad
> Add borders to a PNM image.
> See also: `pnmmargin`, `pamcut`, `pamcomp`.
> More information: <https://netpbm.sourceforge.net/doc/pnmpad.html>.
- 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}}`

16
pages/common/pnmpaste.md Normal file
View File

@ -0,0 +1,16 @@
# pnmpaste
> Paste a PNM image into another PNM image.
> More information: <https://netpbm.sourceforge.net/doc/pnmpaste.html>.
- 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}}`