Expand description
§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
giffeature) - JPEG via zune-jpeg (enable
jpegfeature) - SVG via resvg (enable
svgfeature) - PDF via hayro (enable
pdffeature)
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§
Enums§
- Image
Format - Natively supported image format.
- Image
Source - Image source.
- Sizing
- Image sizing.
Traits§
- Kitty
Image - Kitty image.