fast image operations
Diffstat (limited to 'src/dyn/mod.rs')
-rw-r--r--src/dyn/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dyn/mod.rs b/src/dyn/mod.rs
index 184047a..52feaea 100644
--- a/src/dyn/mod.rs
+++ b/src/dyn/mod.rs
@@ -40,6 +40,12 @@ macro_rules! e {
}
use e;
+impl<'a> std::fmt::Display for DynImage<&'a [u8]> {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ e!(self, |x| crate::term::Display(*x).write(f))
+ }
+}
+
impl<T> DynImage<T> {
/// Get the width of this image.
pub const fn width(&self) -> u32 {