#terminal #image #opencv

app printimg

Print an image or a video in terminal

14 unstable releases (4 breaking)

0.5.5 Feb 27, 2022
0.5.2 Dec 31, 2021
0.4.1 Nov 27, 2021
0.2.1 Feb 2, 2021
0.2.0 Aug 10, 2020

#148 in Video

MIT/Apache

33KB
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

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

~7–20MB
~201K SLoC