#terminal #opencv

app printimg

Print an imgae or a video in terminal

11 unstable releases (4 breaking)

Uses new Rust 2021

0.5.2 Dec 31, 2021
0.5.1 Dec 29, 2021
0.4.3 Dec 4, 2021
0.4.1 Nov 27, 2021
0.1.0 Aug 10, 2020

#30 in Video

Download history 6/week @ 2021-09-29 5/week @ 2021-10-13 1/week @ 2021-10-20 2/week @ 2021-10-27 6/week @ 2021-11-03 7/week @ 2021-11-10 12/week @ 2021-11-17 57/week @ 2021-11-24 55/week @ 2021-12-01 21/week @ 2021-12-08 19/week @ 2021-12-15 39/week @ 2021-12-22 58/week @ 2021-12-29 27/week @ 2022-01-05 10/week @ 2022-01-12

137 downloads per month

MIT/Apache

34KB
397 lines

printimg-rust

crates.io crates.io

Print an image or a video in terminal.

ferris

Installation (build manually with OpenCV)

Ubuntu 20.04

$ sudo apt install libopencv-dev clang libclang-dev
$ cargo install printimg

Ubuntu 18.04

$ sudo apt install libopencv-dev clang libclang-dev
$ cargo install printimg --features opencv-32

Other (Use Docker)

Multi-architecture docker image is available.

$ docker pull oza6ut0ne/opencv:4.3.0  # already installed in the image!

Windows (experimental)

  1. Install OpenCV and LLVM with chocolatey and set environment variables.
    (See README.md of twistedfall/opencv-rust)

  2. Then, install with cargo.

    cargo install printimg
    

Installation (without OpenCV)

cargo install printimg --no-default-features --features image

or download prebuilt binary from Releases.
In this case only image files are supported, but OpenCV is not required.
This is useful if OpenCV cannot be installed in the environment.

Usage

# Print image.
$ printi foo.png

# Print video. (Requires OpenCV)
$ printi bar.mp4

# Print video from USB camera 0. (Requires OpenCV)
$ printi 0

# Print from url. (Requires OpenCV)
$ printi https://rustacean.net/assets/rustacean-flat-happy.png

Dependencies

~13MB
~200K SLoC

'a