From eeedc4ecf732246afbb79daf99de5b11b9d9c324 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Fri, 10 Nov 2023 21:22:32 +0100 Subject: [PATCH] pamfunc, ppmchange, ppmcie, ppmcolormask, ppmdim, ppmdist, ppmfade, ppmforge: add pages (#11449) Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> --- pages/common/pamfunc.md | 12 ++++++++++++ pages/common/ppmchange.md | 16 ++++++++++++++++ pages/common/ppmcie.md | 20 ++++++++++++++++++++ pages/common/ppmcolormask.md | 8 ++++++++ pages/common/ppmdim.md | 9 +++++++++ pages/common/ppmdist.md | 12 ++++++++++++ pages/common/ppmfade.md | 20 ++++++++++++++++++++ pages/common/ppmforge.md | 20 ++++++++++++++++++++ 8 files changed, 117 insertions(+) create mode 100644 pages/common/pamfunc.md create mode 100644 pages/common/ppmchange.md create mode 100644 pages/common/ppmcie.md create mode 100644 pages/common/ppmcolormask.md create mode 100644 pages/common/ppmdim.md create mode 100644 pages/common/ppmdist.md create mode 100644 pages/common/ppmfade.md create mode 100644 pages/common/ppmforge.md diff --git a/pages/common/pamfunc.md b/pages/common/pamfunc.md new file mode 100644 index 0000000000..4c0ce12532 --- /dev/null +++ b/pages/common/pamfunc.md @@ -0,0 +1,12 @@ +# pamfunc + +> Apply a simple arithmetic function to a Netpbm image. +> More information: . + +- Apply the specified arithmetic function with `n` as the second argument to each sample in the specified PAM image: + +`pamfunc -{{multiplier|divisor|adder|subtractor|min|max}} {{n}} {{path/to/input.pam}} > {{path/to/output.pam}}` + +- Apply the specified bit string function with `n` as the second argument to each sample in the specified PAM image: + +`pamfunc -{{andmask|ormask|xormask|shiftleft|shiftright}} {{n}} {{path/to/input.pam}} > {{path/to/output.pam}}` diff --git a/pages/common/ppmchange.md b/pages/common/ppmchange.md new file mode 100644 index 0000000000..24c395affb --- /dev/null +++ b/pages/common/ppmchange.md @@ -0,0 +1,16 @@ +# ppmchange + +> Change all pixels of one color in a PPM image to another color. +> More information: . + +- Exchange the first color in each `oldcolor` - `newcolor` pair with the second color: + +`ppmchange {{oldcolor1 newcolor1 oldcolor2 newcolor2 ...}} {{path/to/input.ppm}} > {{path/to/output.ppm}}` + +- Specify how similar colors must be in order to be considered the same: + +`ppmchange -closeness {{percentage}} {{oldcolor1 newcolor1 oldcolor2 newcolor2 ...}} {{path/to/input.ppm}} > {{path/to/output.ppm}}` + +- Replace all pixels not specified in the arguments by a color: + +`ppmchange -remainder {{color}} {{oldcolor1 newcolor1 oldcolor2 newcolor2 ...}} {{path/to/input.ppm}} > {{path/to/output.ppm}}` diff --git a/pages/common/ppmcie.md b/pages/common/ppmcie.md new file mode 100644 index 0000000000..ce3940638f --- /dev/null +++ b/pages/common/ppmcie.md @@ -0,0 +1,20 @@ +# ppmcie + +> Draw a CIE color chart as a PPM image. +> More information: . + +- Draw a CIE color chart using the REC709 color system as a PPM image: + +`ppmcie > {{path/to/output.ppm}}` + +- Specify the color system to be used: + +`ppmcie -{{cie|ebu|hdtv|ntsc|smpte}} > {{path/to/output.ppm}}` + +- Specify the location of the individual illuminants: + +`ppmcie -{{red|green|blue}} {{xpos ypos}} > {{path/to/output.ppm}}` + +- Do not dim the area outside the Maxwell triangle: + +`ppmcie -full > {{path/to/output.ppm}}` diff --git a/pages/common/ppmcolormask.md b/pages/common/ppmcolormask.md new file mode 100644 index 0000000000..604e5e01d9 --- /dev/null +++ b/pages/common/ppmcolormask.md @@ -0,0 +1,8 @@ +# ppmcolormask + +> Produce a mask of areas of a certain color in a PPM image. +> More information: . + +- Produce a mask of areas of a certain color in the specified PPM image: + +`ppmcolormask -color {{red,blue}} {{path/to/input.ppm}} > {{path/to/output.pbm}}` diff --git a/pages/common/ppmdim.md b/pages/common/ppmdim.md new file mode 100644 index 0000000000..8a8ebc66f3 --- /dev/null +++ b/pages/common/ppmdim.md @@ -0,0 +1,9 @@ +# ppmdim + +> Dim a PPM image. +> Partly superseded by `pamfunc -multiplier`. +> More information: . + +- Dim the specified PPM image by dimfactor: + +`ppmdim {{0.6}} {{path/to/input.ppm}} > {{path/to/output.ppm}}` diff --git a/pages/common/ppmdist.md b/pages/common/ppmdist.md new file mode 100644 index 0000000000..587b087263 --- /dev/null +++ b/pages/common/ppmdist.md @@ -0,0 +1,12 @@ +# ppmdist + +> Produce a grayscale version of a PPM image. +> More information: . + +- Produce a grayscale version of the specified PPM image: + +`ppmdist {{path/to/input.ppm}} > {{path/to/output.pgm}}` + +- Specify the method used to map colors to graylevels: + +`ppmdist -{{frequency|intensity}} {{path/to/input.ppm}} > {{path/to/output.pgm}}` diff --git a/pages/common/ppmfade.md b/pages/common/ppmfade.md new file mode 100644 index 0000000000..537e77de52 --- /dev/null +++ b/pages/common/ppmfade.md @@ -0,0 +1,20 @@ +# ppmfade + +> Generate a transition between two PPM images. +> More information: . + +- Generate a transition between two PPM images ([f]irst and [l]ast) using the specified effect: + +`ppmfade -f {{path/to/image1.ppm}} -l {{path/to/image2.ppm}} -{{mix|spread|shift|relief|oil|...}}` + +- Generate a transition starting with the specified image and ending in a solid black image: + +`ppmfade -f {{path/to/image.ppm}} -{{mix|spread|shift|relief|oil|...}}` + +- Generate a transition starting with a solid black image and ending with the specified image: + +`ppmfade -l {{path/to/image.ppm}} -{{mix|spread|shift|relief|oil|...}}` + +- Store the resulting images in files named `base.NNNN.ppm` where `NNNN` is a increasing number: + +`ppmfade -f {{path/to/image1.ppm}} -l {{path/to/image2.ppm}} -{{mix|spread|shift|relief|oil|...}} -base {{base}}` diff --git a/pages/common/ppmforge.md b/pages/common/ppmforge.md new file mode 100644 index 0000000000..b309bdf8c6 --- /dev/null +++ b/pages/common/ppmforge.md @@ -0,0 +1,20 @@ +# ppmforge + +> Generate fractals resembling clouds, planets and starry skies. +> More information: . + +- Generate an image of a planet: + +`ppmforge > {{path/to/image.ppm}}` + +- Generate an image of clouds or the night sky: + +`ppmforge -{{night|clouds}} > {{path/to/image.ppm}}` + +- Use a custom mesh size and dimension for fractal generation and specify the dimensions of the output: + +`ppmforge -mesh {{512}} -dimension {{2.5}} -xsize {{1000}} -ysize {{1000}} > {{path/to/image.ppm}}` + +- Control the tilt and the angle from which the generated planet is illuminated: + +`ppmforge -tilt {{-15}} -hour {{12}} > {{path/to/image.ppm}}`