printimg

Crates.ioprintimg
lib.rsprintimg
version0.5.6
sourcesrc
created_at2020-08-10 10:39:11.570297
updated_at2024-07-14 06:57:54.983654
descriptionPrint an image or a video in terminal.
homepage
repositoryhttps://github.com/oza6ut0ne/printimg-rust
max_upload_size
id275006
size73,074
(oza6ut0ne)

documentation

README

printimg-rust

crates.io crates.io

Print an image or a video in terminal.

ferris

Installation (build manually with OpenCV)

Ubuntu 20.04 or above

$ 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
Commit count: 61

cargo fmt