Image view for the Cursive TUI library
  • Rust 99.4%
  • Shell 0.6%
Find a file
2026-03-29 19:32:53 -05:00
assets/media Add support for GIF, SVG, and PDF 2026-03-24 17:00:06 -05:00
examples Ongoing 2026-03-29 19:32:53 -05:00
scripts Initial commit 2026-03-21 18:58:12 -05:00
src Ongoing 2026-03-29 19:32:53 -05:00
.gitignore Initial commit 2026-03-21 18:58:12 -05:00
Cargo.lock Ongoing 2026-03-29 19:32:53 -05:00
Cargo.toml Ongoing 2026-03-29 19:32:53 -05:00
LICENSE-APACHE Initial commit 2026-03-21 18:58:12 -05:00
LICENSE-MIT Initial commit 2026-03-21 18:58:12 -05:00
README.md Ongoing 2026-03-29 19:32:53 -05:00
rustfmt.toml Initial commit 2026-03-21 18:58:12 -05:00

crates.io docs.rs

Cursive Image

An image view for the Cursive TUI library.

Works on terminals that support the Kitty graphics protocol, including:

The view supports shrink (the default), fit, and scale sizing modes, image alignment, and scrolling.

You can provide image data directly as RGB (24 bits per pixel), RGBA (32 bits per pixel), or from the following source formats:

  • PNG (natively supported by the graphics protocol; enable png feature for some extra functionality)
  • GIF (enable gif feature; internally relies on gif)
  • JPEG (enable jpeg feature; internally relies on zune-jpeg)
  • SVG (enable svg feature; internally relies on resvg)
  • PDF (enable pdf feature; internally relies on hayro)

Supports both standard (sprite) and placeholder modes.

It also automatically uses tmux passthrough mode if it detects that it's in a tmux session. However, note that this feature is not enabled by default in tmux. To enable it from the terminal:

tmux set -g allow-passthrough on

Or add this to ~/.tmux.conf:

set -g allow-passthrough on

Check out the examples.

License

Like much of the Rust ecosystem this project is licensed under your choice of either

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

All code and documentation was written by humans. We do not accept "AI"-generated contributions.