Browse Source

pamfunc, ppmchange, ppmcie, ppmcolormask, ppmdim, ppmdist, ppmfade, ppmforge: add pages (#11449)

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
Juri Dispan 1 year ago
parent
commit
eeedc4ecf7

+ 12 - 0
pages/common/pamfunc.md

@@ -0,0 +1,12 @@
+# pamfunc
+
+> Apply a simple arithmetic function to a Netpbm image.
+> More information: <https://netpbm.sourceforge.net/doc/pamfunc.html>.
+
+- 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}}`

+ 16 - 0
pages/common/ppmchange.md

@@ -0,0 +1,16 @@
+# ppmchange
+
+> Change all pixels of one color in a PPM image to another color.
+> More information: <https://netpbm.sourceforge.net/doc/ppmchange.html>.
+
+- 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}}`

+ 20 - 0
pages/common/ppmcie.md

@@ -0,0 +1,20 @@
+# ppmcie
+
+> Draw a CIE color chart as a PPM image.
+> More information: <https://netpbm.sourceforge.net/doc/ppmcie.html>.
+
+- 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}}`

+ 8 - 0
pages/common/ppmcolormask.md

@@ -0,0 +1,8 @@
+# ppmcolormask
+
+> Produce a mask of areas of a certain color in a PPM image.
+> More information: <https://netpbm.sourceforge.net/doc/ppmcolormask.html>.
+
+- 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}}`

+ 9 - 0
pages/common/ppmdim.md

@@ -0,0 +1,9 @@
+# ppmdim
+
+> Dim a PPM image.
+> Partly superseded by `pamfunc -multiplier`.
+> More information: <https://netpbm.sourceforge.net/doc/ppmdim.html>.
+
+- Dim the specified PPM image by dimfactor:
+
+`ppmdim {{0.6}} {{path/to/input.ppm}} > {{path/to/output.ppm}}`

+ 12 - 0
pages/common/ppmdist.md

@@ -0,0 +1,12 @@
+# ppmdist
+
+> Produce a grayscale version of a PPM image.
+> More information: <https://netpbm.sourceforge.net/doc/ppmdist.html>.
+
+- 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}}`

+ 20 - 0
pages/common/ppmfade.md

@@ -0,0 +1,20 @@
+# ppmfade
+
+> Generate a transition between two PPM images.
+> More information: <https://netpbm.sourceforge.net/doc/ppmfade.html>.
+
+- 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}}`

+ 20 - 0
pages/common/ppmforge.md

@@ -0,0 +1,20 @@
+# ppmforge
+
+> Generate fractals resembling clouds, planets and starry skies.
+> More information: <https://netpbm.sourceforge.net/doc/ppmforge.html>.
+
+- 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}}`