Skip to main content

Crate cursive_image

Crate cursive_image 

Source
Expand description

crates.io docs.rs

§Cursive Image

An image view for the Cursive TUI library.

Works on terminals that support the Kitty graphics protocol, such as the following:

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)
  • GIF via gif (enable gif feature)
  • JPEG via zune-jpeg (enable jpeg feature)
  • SVG via resvg (enable svg feature)
  • PDF via hayro (enable pdf feature)

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

Check out the examples.

In the future we may add support for additional graphics protocols, namely iTerm and Sixel.

§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.

Structs§

Image
Image.
ImageView
Image view.

Enums§

ImageFormat
Natively supported image format.
ImageSource
Image source.
Sizing
Image sizing.

Traits§

KittyImage
Kitty image.