From ac390f0fd08fc179439a83299ea951de67808092 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Fri, 10 Nov 2023 09:41:41 +0100 Subject: [PATCH] pbmmake, pgmmake, ppmlabel, ppmmake, ppmmix, ppmntsc, ppmpat: add pages (#11435) Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> --- pages/common/pbmmake.md | 12 ++++++++++++ pages/common/pgmmake.md | 8 ++++++++ pages/common/ppmlabel.md | 16 ++++++++++++++++ pages/common/ppmmake.md | 8 ++++++++ pages/common/ppmmix.md | 8 ++++++++ pages/common/ppmntsc.md | 20 ++++++++++++++++++++ pages/common/ppmpat.md | 12 ++++++++++++ 7 files changed, 84 insertions(+) create mode 100644 pages/common/pbmmake.md create mode 100644 pages/common/pgmmake.md create mode 100644 pages/common/ppmlabel.md create mode 100644 pages/common/ppmmake.md create mode 100644 pages/common/ppmmix.md create mode 100644 pages/common/ppmntsc.md create mode 100644 pages/common/ppmpat.md diff --git a/pages/common/pbmmake.md b/pages/common/pbmmake.md new file mode 100644 index 0000000000..5230092738 --- /dev/null +++ b/pages/common/pbmmake.md @@ -0,0 +1,12 @@ +# pbmmake + +> Create a blank bitmap. +> More information: . + +- Create a blank bitmap of the specified dimensions: + +`pbmmake {{width}} {{height}} > {{path/to/output_file.pbm}}` + +- Specify the color of the created bitmap: + +`pbmmake -{{white|black|grey}} {{width}} {{height}} > {{path/to/output_file.pbm}}` diff --git a/pages/common/pgmmake.md b/pages/common/pgmmake.md new file mode 100644 index 0000000000..b40a9c703c --- /dev/null +++ b/pages/common/pgmmake.md @@ -0,0 +1,8 @@ +# pgmmake + +> Create PGM image with a uniform gray level. +> More information: . + +- Create PGM image with a uniform gray level (specified as a number between 0 and 1) and the specified dimensions: + +`pgmmake {{graylevel}} {{width}} {{height}} > {{path/to/output_file.pgm}}` diff --git a/pages/common/ppmlabel.md b/pages/common/ppmlabel.md new file mode 100644 index 0000000000..48dca3e3b6 --- /dev/null +++ b/pages/common/ppmlabel.md @@ -0,0 +1,16 @@ +# ppmlabel + +> Add text to a PPM image. +> More information: . + +- Add text to a PPM image at the specified location: + +`ppmlabel -x {{pos_x}} -y {{pos_y}} -text {{text}} {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}` + +- Add multiple texts at different locations: + +`ppmlabel -x {{pos_x1}} -y {{pos_y1}} -text {{text1}} -x {{pos_x2}} -y {{pos_y2}} -text {{text2}} {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}` + +- Specify the line color, the background color, the tilt and the size of the added text: + +`ppmlabel -x {{pos_x}} -y {{pos_y}} -color {{line_color}} -background {{background_color}} -angle {{tilt}} -size {{size}} -text {{text}} {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}` diff --git a/pages/common/ppmmake.md b/pages/common/ppmmake.md new file mode 100644 index 0000000000..628d5e5e6e --- /dev/null +++ b/pages/common/ppmmake.md @@ -0,0 +1,8 @@ +# ppmmake + +> Create a PPM image of a specified color and dimensions. +> More information: . + +- Create a PPM image of the specified color and dimensions: + +`ppmmake {{color}} {{width}} {{height}} > {{path/to/output_file.ppm}}` diff --git a/pages/common/ppmmix.md b/pages/common/ppmmix.md new file mode 100644 index 0000000000..a6154221b6 --- /dev/null +++ b/pages/common/ppmmix.md @@ -0,0 +1,8 @@ +# ppmmix + +> Blend together two PPM images. +> More information: . + +- Blend the specified PPM images using fadefactor to control the weight of each image: + +`ppmmix {{fadefactor}} {{path/to/input_file1.ppm}} {{path/to/input_file2.ppm}} > {{path/to/output_file.ppm}}` diff --git a/pages/common/ppmntsc.md b/pages/common/ppmntsc.md new file mode 100644 index 0000000000..872e0dec5c --- /dev/null +++ b/pages/common/ppmntsc.md @@ -0,0 +1,20 @@ +# ppmntsc + +> Make the RGB colors in a PPM image compatible with NTSC or PAL color systems. +> More information: . + +- Make the RGB colors in a PPM image compatible with NTSC color systems: + +`ppmntsc {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}` + +- Make the RGB colors in a PPM image compatible with PAL color systems: + +`ppmntsc --pal {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}` + +- Print the number of illegal pixels in the input image to `stderr`: + +`ppmntsc --verbose {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}` + +- Output only legal/illegal/corrected pixels, set other pixels to black: + +`ppmntsc --{{legalonly|illegalonly|correctedonly}} {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}` diff --git a/pages/common/ppmpat.md b/pages/common/ppmpat.md new file mode 100644 index 0000000000..957d09c907 --- /dev/null +++ b/pages/common/ppmpat.md @@ -0,0 +1,12 @@ +# ppmpat + +> Produce a PPM image with a pattern. +> More information: . + +- Produce a PPM file of the specified pattern with the specified dimensions: + +`ppmpat -{{gingham2|gingham3|madras|tartan|poles|...}} {{width}} {{height}} > {{path/to/file.ppm}}` + +- Produce a PPM file of a camo pattern using the specified colors: + +`ppmpat -camo -color {{color1,color2,...}} {{width}} {{height}} > {{path/to/file.ppm}}`