mirror of https://github.com/CrimsonTome/tldr.git
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
parent
14ea45723b
commit
a47af264de
|
@ -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}}`
|
|
@ -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`
|
|
@ -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}}`
|
|
@ -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}}`
|
|
@ -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}}`
|
Loading…
Reference in New Issue