pamcomp, pnmcomp, pnmconvol, pnmcrop, pnmgamma: add pages (#12197)

* pamcomp, pnmcomp, pnmconvol, pnmcrop, pnmgamma: add pages

* Update pages/common/pnmgamma.md

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
pull/23/head
Juri Dispan 2024-02-06 16:12:53 +01:00 committed by GitHub
parent 14ea45723b
commit a47af264de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 88 additions and 0 deletions

20
pages/common/pamcomp.md Normal file
View File

@ -0,0 +1,20 @@
# pamcomp
> Overlay two PAM images.
> More information: <https://netpbm.sourceforge.net/doc/pamcomp.html>.
- Overlay two images such with the overlay blocking parts of the underlay:
`pamcomp {{path/to/overlay.pam}} {{path/to/underlay.pam}} > {{path/to/output.pam}}`
- Set the horizontal alignment of the overlay:
`pamcomp -align {{left|center|right|beyondleft|beyondright}} -xoff {{x_offset}} {{path/to/overlay.pam}} {{path/to/underlay.pam}} > {{path/to/output.pam}}`
- Set the vertical alignment of the overlay:
`pamcomp -valign {{top|middle|bottom|above|below}} -yoff {{y_offset}} {{path/to/overlay.pam}} {{path/to/underlay.pam}} > {{path/to/output.pam}}`
- Set the opacity of the overlay:
`pamcomp -opacity {{0.7}} {{path/to/overlay.pam}} {{path/to/underlay.pam}} > {{path/to/output.pam}}`

8
pages/common/pnmcomp.md Normal file
View File

@ -0,0 +1,8 @@
# pnmcomp
> This command is superseded by `pamcomp`.
> More information: <https://netpbm.sourceforge.net/doc/pnmcomp.html>.
- View documentation for the current command:
`tldr pamcomp`

20
pages/common/pnmconvol.md Normal file
View File

@ -0,0 +1,20 @@
# pnmconvol
> Convolute a PNM image.
> More information: <https://netpbm.sourceforge.net/doc/pnmconvol.html>.
- Convolve a PNM image with the specified convolution matrix:
`pnmconvol -matrix=-1,3,-1 {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Convolve a PNM image with the convolution matrix in the specified files, one for each layer in the input image:
`pnmconvol -matrixfile {{path/to/matrix1,path/to/matrix2,...}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Convolve a PNM image with the convolution matrix in the specified PNM file:
`pnmconvol {{path/to/matrix.pnm}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Normalize the weights in the convolution matrix such that they add up to one:
`pnmconvol -matrix=-1,3,-1 -normalize {{path/to/image.pnm}} > {{path/to/output.pnm}}`

20
pages/common/pnmcrop.md Normal file
View File

@ -0,0 +1,20 @@
# pnmcrop
> Crop PNM images.
> More information: <https://netpbm.sourceforge.net/doc/pnmcrop.html>.
- Remove white borders on a PNM image:
`pnmcrop -white {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Remove borders of the specified color that are on the top and left side of the image:
`pnmcrop -bg-color {{color}} -top -left {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Determine the color of the borders to be removed by the color of the pixel in the specified corner:
`pnmcrop -bg-corner {{topleft|topright|bottomleft|bottomright}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Leave a border with a width of `n` pixels. Additionally, specify the behaviour if the image is entirely made out of background:
`pnmcrop -margins {{n}} -blank-image {{pass|minimize|maxcrop}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`

20
pages/common/pnmgamma.md Normal file
View File

@ -0,0 +1,20 @@
# pnmgamma
> Perform gamma correction on PNM images.
> More information: <https://netpbm.sourceforge.net/doc/pnmgamma.html>.
- Convert the image from BT.709 luminance to radiance or sRGB luminance:
`pnmgamma -{{bt709tolinear|bt709tosrgb}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Convert the image from radiance or sRGB luminance to BT.709 luminance:
`pnmgamma -{{lineartobt709|srgbtobt709}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Specify the gamma value used for the gamma transfer function:
`pnmgamma -gamma {{value}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`
- Specify the gamma value used for the gamma transfer function per color component:
`pnmgamma -rgamma {{value}} -ggamma {{value}} -bgamma {{value}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`