mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 06:02:18 +02:00
pamdepth, ppmdither, pamditherbw, pnmdepth: add pages (#11379)
* pamdepth, pamdither, pamditherbw: add pages * pnmdepth: add alias page
This commit is contained in:
parent
96a6099652
commit
0638b8d95d
4 changed files with 52 additions and 0 deletions
8
pages/common/pamdepth.md
Normal file
8
pages/common/pamdepth.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# pamdepth
|
||||
|
||||
> Reduce the depth (i.e. color resolution) in an image.
|
||||
> More information: <https://netpbm.sourceforge.net/doc/pamdepth.html>.
|
||||
|
||||
- Read a PBM image, set its maxval and save it to a file:
|
||||
|
||||
`pamdepth {{maxval}} {{path/to/image.pbm}} > {{path/to/file.pbm}}`
|
20
pages/common/pamditherbw.md
Normal file
20
pages/common/pamditherbw.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# pamditherbw
|
||||
|
||||
> Apply dithering to a greyscale image, i.e. turn it into a pattern of black and white pixels that look the same as the original greyscale.
|
||||
> More information: <https://netpbm.sourceforge.net/doc/pamditherbw.html>.
|
||||
|
||||
- Read a PGM image, apply dithering and save it to a file:
|
||||
|
||||
`ppmditherbw {{path/to/image.pgm}} > {{path/to/file.pgm}}`
|
||||
|
||||
- Use the specified quantization method:
|
||||
|
||||
`ppmditherbw -{{floyd|fs|atkinson|threshold|hilbert|...}} {{path/to/image.pgm}} > {{path/to/file.pgm}}`
|
||||
|
||||
- Use the atkinson quantization method and the specified seed for a pseudo-random number generator:
|
||||
|
||||
`ppmditherbw -atkinson -randomseed {{1337}} {{path/to/image.pgm}} > {{path/to/file.pgm}}`
|
||||
|
||||
- Specify the thresholding value for quantization methods that perform some sort of thresholding:
|
||||
|
||||
`ppmditherbw -{{fs|atkinson|thresholding}} -value {{0.3}} {{path/to/image.pgm}} > {{path/to/file.pgm}}`
|
8
pages/common/pnmdepth.md
Normal file
8
pages/common/pnmdepth.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# pnmdepth
|
||||
|
||||
> This command is an alias of `pamdepth`.
|
||||
> More information: <https://netpbm.sourceforge.net/doc/pnmdepth.html>.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr pamdepth`
|
16
pages/common/ppmdither.md
Normal file
16
pages/common/ppmdither.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# ppmdither
|
||||
|
||||
> Reduce the number of colors in an image by applying dithering.
|
||||
> More information: <https://netpbm.sourceforge.net/doc/ppmdither.html>.
|
||||
|
||||
- Read a PPM image, apply dithering and save it to a file:
|
||||
|
||||
`ppmdither {{path/to/image.ppm}} > {{path/to/file.ppm}}`
|
||||
|
||||
- Specify the desired number of shades for each primary color:
|
||||
|
||||
`ppmdither -red {{2}} -green {{3}} -blue {{2}} {{path/to/image.ppm}} > {{path/to/file.ppm}}`
|
||||
|
||||
- Specify the dimensions of the dithering matrix:
|
||||
|
||||
`ppmdither -dim {{2}} {{path/to/image.ppm}} > {{path/to/file.ppm}}`
|
Loading…
Add table
Reference in a new issue