diff --git a/pages/common/pamflip.md b/pages/common/pamflip.md new file mode 100644 index 000000000..99c3fcfb4 --- /dev/null +++ b/pages/common/pamflip.md @@ -0,0 +1,20 @@ +# pamflip + +> Flip or rotate a PAM or PNM image. +> More information: . + +- Rotate the input image counter-clockwise for a specific degree: + +`pamflip -rotate{{90|180|270}} {{path/to/input.pam}} > {{path/to/output.pam}}` + +- Flip left for right: + +`pamflip -leftright {{path/to/input.pam}} > {{path/to/output.pam}}` + +- Flip top for bottom: + +`pamflip -topbottom {{path/to/input.pam}} > {{path/to/output.pam}}` + +- Flip the input image on the main diagonal: + +`pamflip -transpose {{path/to/input.pam}} > {{path/to/output.pam}}` diff --git a/pages/common/pnmcolormap.md b/pages/common/pnmcolormap.md new file mode 100644 index 000000000..f0bd7330c --- /dev/null +++ b/pages/common/pnmcolormap.md @@ -0,0 +1,16 @@ +# pnmcolormap + +> Create quantization color map for a PNM image. +> More information: . + +- Generate an image using only `n_colors` or less colors as close as possible to the input image: + +`pnmcolormap {{n_colors}} {{path/to/input.pnm}} > {{path/to/output.ppm}}` + +- Use the splitspread strategy for determining the output colors, possibly producing a better result for images with small details: + +`pnmcolormap -splitspread {{n_colors}} {{path/to/input.pnm}} > {{path/to/output.ppm}}` + +- Sort the resulting colormap, which is useful for comparing colormaps: + +`pnmcolormap -sort {{path/to/input.pnm}} > {{path/to/output.ppm}}` diff --git a/pages/common/pnmquant.md b/pages/common/pnmquant.md new file mode 100644 index 000000000..3eb30a444 --- /dev/null +++ b/pages/common/pnmquant.md @@ -0,0 +1,9 @@ +# pnmquant + +> Quantize the colors in a PNM image into a smaller set. +> This command is a combination of `pnmcolormap` and `pnmremap` and accepts the union of their options, except `-mapfile`. +> More information: . + +- Generate an image using only `n_colors` or less colors as close as possible to the input image: + +`pnmquant {{n_colors}} {{path/to/input.pnm}} > {{path/to/output.pnm}}` diff --git a/pages/common/pnmremap.md b/pages/common/pnmremap.md new file mode 100644 index 000000000..e50432b7e --- /dev/null +++ b/pages/common/pnmremap.md @@ -0,0 +1,20 @@ +# pnmremap + +> Replace the colors in a PNM image. +> More information: . + +- Replace the colors in an image with those in the specified color palette: + +`pnmremap -mapfile {{path/to/palette_file.ppm}} {{path/to/input.pnm}} > {{path/to/output.pnm}}` + +- Use Floyd-Steinberg dithering for representing colors missing in the color palette: + +`pnmremap -mapfile {{path/to/palette_file.ppm}} -floyd {{path/to/input.pnm}} > {{path/to/output.pnm}}` + +- Use the first color in the palette for representing colors missing in the color palette: + +`pnmremap -mapfile {{path/to/palette_file.ppm}} -firstisdefault {{path/to/input.pnm}} > {{path/to/output.pnm}}` + +- Use the specified color for representing colors missing in the color palette: + +`pnmremap -mapfile {{path/to/palette_file.ppm}} -missingcolor {{color}} {{path/to/input.pnm}} > {{path/to/output.pnm}}` diff --git a/pages/common/pnmrotate.md b/pages/common/pnmrotate.md new file mode 100644 index 000000000..6e1974680 --- /dev/null +++ b/pages/common/pnmrotate.md @@ -0,0 +1,16 @@ +# pnmrotate + +> Rotate a PNM image. +> More information: . + +- Rotate a PNM image by some angle (measured in degrees, counter-clockwise): + +`pnmrotate {{angle}} {{path/to/input.pnm}} > {{path/to/output.pnm}}` + +- Specify the background color exposed by rotating the input image: + +`pnmrotate -background {{color}} {{angle}} {{path/to/input.pnm}} > {{path/to/output.pnm}}` + +- Disable anti-aliasing, improving performance but decreasing quality: + +`pnmrotate -noantialias {{angle}} {{path/to/input.pnm}} > {{path/to/output.pnm}}` diff --git a/pages/common/ppmquant.md b/pages/common/ppmquant.md new file mode 100644 index 000000000..97fd9d657 --- /dev/null +++ b/pages/common/ppmquant.md @@ -0,0 +1,12 @@ +# ppmquant + +> This command has been replaced by `pnmquant` and `pnmremap`. +> More information: . + +- View documentation for `pnmquant`: + +`tldr pnmquant` + +- View documentation for `pnmremap`: + +`tldr pnmremap`