#cli #terminal #tool #utility #image

app picst

A CLI tool to resize clipboard images on the fly

8 releases (5 stable)

Uses new Rust 2021

2.0.3 Dec 26, 2022
2.0.2 Dec 18, 2022
2.0.1 Nov 27, 2022
1.0.0 Nov 13, 2022
0.1.2 Nov 6, 2022

#680 in Command line utilities

29 downloads per month

MIT license

37KB
744 lines

██████╗ ██╗ ██████╗███████╗████████╗
██╔══██╗██║██╔════╝██╔════╝╚══██╔══╝
██████╔╝██║██║     ███████╗   ██║
██╔═══╝ ██║██║     ╚════██║   ██║
██║     ██║╚██████╗███████║   ██║
╚═╝     ╚═╝ ╚═════╝╚══════╝   ╚═╝

GitHub Workflow Status Crates.io

📷 Presentation

picst is a small cross-platform CLI tool aiming at making the "copy → resize → paste" image workflow super simple and more friendly.

Start picst, copy an image, eventually provide new dimensions if not passed via the flags, paste it anywhere - a piece of cake 🍰!

🛠️ Installation

Cargo

cargo install picst

Binaries

Binaries for new releases are also available here.

⚡️ Usage

picst is able to manage three different kind of unit to resize images: percent | pixels | ratio.

Note: picst will keep running and checking for new images copied in the clipboard until the process is stopped.

Percent

Use the --height-percent or the --width-percent flags:

picst --height-percent 30
picst --width-percent 50

By default, picst preserves the aspect ratio of the image and will adjust the other dimension accordingly.

You can either skip this behavior with the --ignore-aspect-ratio flag - the tool will then prompt you for the other dimension - or you can directly set both flags:

picst --height-percent 30 --width-percent 50

Pixels

Use the --height or the --width flags:

picst --height 300
picst --width 500

By default, picst preserves the aspect ratio of the image and will adjust the other dimension accordingly.

You can either skip this behavior with the --ignore-aspect-ratio flag - the tool will then prompt you for the other dimension - or you can directly set both flags:

picst --height 300 --width 500

Ratio

Use the --ratio flag:

picst --ratio 0.7

Special case: no flags

If no flags are passed to the tool, a complete wizard will be presented to you:

picst
Pixel --------┐
              |--->  Height* | Width* | Both --->  value(s)
Percentage ---┘

Ratio ------------>  value
  • With Height and Width, the aspect ratio will be preserved.

Dependencies

~18–24MB
~338K SLoC