From 5168d0f6d9f9e6aec17da3cc4abc0a825f9ce749 Mon Sep 17 00:00:00 2001 From: bendn Date: Tue, 5 Sep 2023 09:58:07 +0700 Subject: [PATCH] save vecs too --- src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fda1cb2..d64c02c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -243,6 +243,15 @@ impl Image, CHANNELS> { } macro_rules! save { ($channels:literal == $clr:ident ($clrhuman:literal)) => { + impl Image, $channels> { + #[doc = "Save this "] + #[doc = $clrhuman] + #[doc = " image."] + pub fn save(&self, f: impl AsRef) { + self.as_ref().save(f) + } + } + impl Image<&[u8], $channels> { #[cfg(feature = "save")] #[doc = "Save this "]