Giter VIP home page Giter VIP logo

picst's Introduction

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

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.

picst's People

Contributors

yamafaktory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

picst's Issues

Option to resize with keeping the ratio

For example a picture is 3:4 and I want to resize it to half of its curernt size without losing the ratio. There could be a dedicated command line argument for this. Like:

--resize-with-ratio <f32>

Strip the ELF

The ELF from 0.1.2 release for x86_64 Linux is not stripped. The binary before strip is 8.2M and after strip becomes 3.4M.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.