From acafa880547fd37e4fb995003cabb8b649c66fcc Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Thu, 22 Feb 2024 16:23:38 +0100 Subject: [PATCH] fitstopnm, pamcut, pamdeinterlace, pamdice, pammixinterlace, pamtofits, pamundice, pnmtofits: add pages (#12296) * fitstopnm, pamcut, pamdeinterlace, pamdice, pammixinterlace, pamtofits, pamundice, pnmtofits: add pages * Apply suggestions from code review Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> * Update pages/common/pamdice.md * Update pages/common/fitstopnm.md Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> * Update pages/common/fitstopnm.md Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> * Update pages/common/pamundice.md --------- Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> --- pages/common/fitstopnm.md | 13 +++++++++++++ pages/common/pamcut.md | 17 +++++++++++++++++ pages/common/pamdeinterlace.md | 13 +++++++++++++ pages/common/pamdice.md | 13 +++++++++++++ pages/common/pammixinterlace.md | 17 +++++++++++++++++ pages/common/pamtofits.md | 9 +++++++++ pages/common/pamundice.md | 17 +++++++++++++++++ pages/common/pnmtofits.md | 8 ++++++++ 8 files changed, 107 insertions(+) create mode 100644 pages/common/fitstopnm.md create mode 100644 pages/common/pamcut.md create mode 100644 pages/common/pamdeinterlace.md create mode 100644 pages/common/pamdice.md create mode 100644 pages/common/pammixinterlace.md create mode 100644 pages/common/pamtofits.md create mode 100644 pages/common/pamundice.md create mode 100644 pages/common/pnmtofits.md diff --git a/pages/common/fitstopnm.md b/pages/common/fitstopnm.md new file mode 100644 index 000000000..cf919ca80 --- /dev/null +++ b/pages/common/fitstopnm.md @@ -0,0 +1,13 @@ +# fitstopnm + +> Convert a Flexible Image Transport System (FITS) file to a PNM image. +> See also: `pamtofits`. +> More information: . + +- Convert a FITS file to a PNM image: + +`fitstopnm {{path/to/file.fits}} > {{path/to/output.pnm}}` + +- Convert the image on the specified position of the third axis in the FITS file: + +`fitstopnm -image {{z_position}} {{path/to/file.fits}} > {{path/to/output.pnm}}` diff --git a/pages/common/pamcut.md b/pages/common/pamcut.md new file mode 100644 index 000000000..34f54960a --- /dev/null +++ b/pages/common/pamcut.md @@ -0,0 +1,17 @@ +# pamcut + +> Cut out a rectangular region from a Netpbm image. +> See also: `pamcrop`, `pamdice`, `pamcomp`. +> More information: . + +- Discard the specified number of columns/rows on each side of the image: + +`pamcut -cropleft {{value}} -cropright {{value}} -croptop {{value}} -cropbottom {{value}} {{path/to/image.ppm}} > {{path/to/output.ppm}}` + +- Keep only the columns between the specified columns (inclusively): + +`pamcut -left {{value}} -right {{value}} {{path/to/image.ppm}} > {{path/to/output.ppm}}` + +- Fill missing areas with black pixels if the specified rectangle does not entirely lie within the input image: + +`pamcut -top {{value}} -bottom {{value}} -pad {{path/to/image.ppm}} > {{path/to/output.ppm}}` diff --git a/pages/common/pamdeinterlace.md b/pages/common/pamdeinterlace.md new file mode 100644 index 000000000..9950b8713 --- /dev/null +++ b/pages/common/pamdeinterlace.md @@ -0,0 +1,13 @@ +# pamdeinterlace + +> Remove every other row in a Netpbm image. +> See also: `pammixinterlace`. +> More information: . + +- Produce an image consisting of the input's even-numbered rows: + +`pamdeinterlace {{path/to/image.ppm}} > {{path/to/output.ppm}}` + +- Produce an image consisting of the input's odd-numbered rows: + +`pamdeinterlace -takeodd {{path/to/image.ppm}} > {{path/to/output.ppm}}` diff --git a/pages/common/pamdice.md b/pages/common/pamdice.md new file mode 100644 index 000000000..39624031a --- /dev/null +++ b/pages/common/pamdice.md @@ -0,0 +1,13 @@ +# pamdice + +> Slice a Netpbm image vertically or horizontally. +> See also: `pamundice`. +> More information: . + +- Slice a Netpbm image such that the resulting tiles have the specified height and width: + +`pamdice -outstem {{path/to/filename_stem}} -height {{value}} -width {{value}} {{path/to/input.ppm}}` + +- Make the produced pieces overlap by the specified amount horizontally and vertically: + +`pamdice -outstem {{path/to/filename_stem}} -height {{value}} -width {{value}} -hoverlap {{value}} -voverlap {{value}} {{path/to/input.ppm}}` diff --git a/pages/common/pammixinterlace.md b/pages/common/pammixinterlace.md new file mode 100644 index 000000000..10d38494e --- /dev/null +++ b/pages/common/pammixinterlace.md @@ -0,0 +1,17 @@ +# pammixinterlace + +> Merge each row in an image with its two neighbours. +> See also: `pamdeinterlace`. +> More information: . + +- Merge each row in an image with its two neighbours: + +`pammixinterlace {{path/to/image.ppm}} > {{path/to/output.ppm}}` + +- Use the specified filtering mechanism: + +`pammixinterlace -filter {{linear|fir|ffmpeg}} {{path/to/image.ppm}} > {{path/to/output.ppm}}` + +- Turn on adaptive filtering mode, i.e., only modify pixels that are obviously part of a comb pattern: + +`pammixinterlace -adaptive {{path/to/image.ppm}} > {{path/to/output.ppm}}` diff --git a/pages/common/pamtofits.md b/pages/common/pamtofits.md new file mode 100644 index 000000000..bcad2bff3 --- /dev/null +++ b/pages/common/pamtofits.md @@ -0,0 +1,9 @@ +# pamtofits + +> Convert a Netpbm image to the Flexible Image Transport System (FITS) format. +> See also: `fitstopnm`. +> More information: . + +- Convert a Netpbm image to the FITS format: + +`pamtofits {{path/to/image.pam}} > {{path/to/output.fits}}` diff --git a/pages/common/pamundice.md b/pages/common/pamundice.md new file mode 100644 index 000000000..f5fa38a77 --- /dev/null +++ b/pages/common/pamundice.md @@ -0,0 +1,17 @@ +# pamundice + +> Combine a grid of Netpbm images into one. +> See also: `pamdice`. +> More information: . + +- Combine the images whose names match the `printf`-style filename expression. Assume a grid with a specific size: + +`pamundice {{filename_%1d_%1a.ppm}} -across {{grid_width}} -down {{grid_height}} > {{path/to/output.ppm}}` + +- Assume that the tiles overlap horizontally and vertically by the specified amount: + +`pamundice {{filename_%1d_%1a.ppm}} -across {{x_value}} -down {{y_value}} -hoverlap {{value}} -voverlap {{value}} > {{path/to/output.ppm}}` + +- Specify the images to be combined through a text file containing one filename per line: + +`pamundice -listfile {{path/to/file.txt}} -across {{x_value}} -down {{y_value}} > {{path/to/output.ppm}}` diff --git a/pages/common/pnmtofits.md b/pages/common/pnmtofits.md new file mode 100644 index 000000000..5545a9b47 --- /dev/null +++ b/pages/common/pnmtofits.md @@ -0,0 +1,8 @@ +# pnmtofits + +> This command is superseded by `pamtofits`. +> More information: . + +- View documentation for the current command: + +`tldr pamtofits`