macro_rules! show_image {
($image:expr) => { ... };
($image: expr, $option: expr) => { ... };
}Expand description
A macro to display a single image to the terminal using default options or custom options.
This macro provides a convenient way to display images without manually setting up the image processor and display protocol. It automatically detects the best terminal protocol to use and processes the image accordingly.
§Arguments
$image- An image of typeimage::DynamicImageto be displayed$option(optional) - CustomImageProcessorOptionsto control how the image is processed
§Examples
ⓘ
// Display an image with default options
show_image!(my_image);
// Display an image with custom options
let options = ImageProcessorOptions::default()
.option_display_mode(DisplayMode::Ascii);
show_image!(my_image, options);