1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/pnmpad.md
Juri Dispan 95e6753d3e
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>
2024-02-09 19:23:54 +05:30

21 lines
793 B
Markdown

# 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}}`