From 93bf18f39a409f442a2fdc3938c6bb9d20e9e5e8 Mon Sep 17 00:00:00 2001 From: Juri Dispan Date: Tue, 19 Dec 2023 12:51:08 +0100 Subject: [PATCH] pamscale, pnmscale, pnmscalefixed: add pages (#11779) --- pages/common/pamscale.md | 24 ++++++++++++++++++++++++ pages/common/pnmscale.md | 8 ++++++++ pages/common/pnmscalefixed.md | 17 +++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 pages/common/pamscale.md create mode 100644 pages/common/pnmscale.md create mode 100644 pages/common/pnmscalefixed.md diff --git a/pages/common/pamscale.md b/pages/common/pamscale.md new file mode 100644 index 0000000000..480eaf0d39 --- /dev/null +++ b/pages/common/pamscale.md @@ -0,0 +1,24 @@ +# pamscale + +> Scale a Netpbm image. +> More information: . + +- Scale an image such that the result has the specified dimensions: + +`pamscale -width {{width}} -height {{height}} {{path/to/input.pam}} > {{path/to/output.pam}}` + +- Scale an image such that the result has the specified width, keeping the aspect ratio: + +`pamscale -width {{width}} {{path/to/input.pam}} > {{path/to/output.pam}}` + +- Scale an image such that its width and height is changed by the specified factors: + +`pamscale -xscale {{x_factor}} -yscale {{y_factor}} {{path/to/input.pam}} > {{path/to/output.pam}}` + +- Scale an image such that it fits into the specified bounding box while preserving its aspect ratio: + +`pamscale -xyfit {{bbox_width}} {{bbox_height}} {{path/to/input.pam}} > {{path/to/output.pam}}` + +- Scale an image such that it completely fills the specified box while preserving its aspect ratio: + +`pamscale -xyfill {{box_width}} {{box_height}} {{path/to/input.pam}} > {{path/to/output.pam}}` diff --git a/pages/common/pnmscale.md b/pages/common/pnmscale.md new file mode 100644 index 0000000000..aa96a39636 --- /dev/null +++ b/pages/common/pnmscale.md @@ -0,0 +1,8 @@ +# pnmscale + +> This command has been replaced by `pamscale`. +> More information: . + +- View documentation for `pamscale`: + +`tldr pamscale` diff --git a/pages/common/pnmscalefixed.md b/pages/common/pnmscalefixed.md new file mode 100644 index 0000000000..080b75f6b4 --- /dev/null +++ b/pages/common/pnmscalefixed.md @@ -0,0 +1,17 @@ +# pnmscalefixed + +> Scale a PNM file quickly with possibly reduced quality. +> See also: `pamscale`. +> More information: . + +- Scale an image such that the result has the specified dimensions: + +`pnmscalefixed -width {{width}} -height {{height}} {{path/to/input.pnm}} > {{path/to/output.pnm}}` + +- Scale an image such that the result has the specified width, keeping the aspect ratio: + +`pnmscalefixed -width {{width}} {{path/to/input.pnm}} > {{path/to/output.pnm}}` + +- Scale an image such that its width and height is changed by the specified factors: + +`pnmscalefixed -xscale {{x_factor}} -yscale {{y_factor}} {{path/to/input.pnm}} > {{path/to/output.pnm}}`