diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | use std::io; | 5 | use std::io; |
6 | 6 | ||
7 | #[cfg(feature = "png")] | ||
7 | pub mod convert; | 8 | pub mod convert; |
8 | mod decode; | 9 | mod decode; |
9 | mod encode; | 10 | mod encode; |
@@ -167,6 +168,7 @@ impl Image { | |||
167 | decode::decode_image(data) | 168 | decode::decode_image(data) |
168 | } | 169 | } |
169 | 170 | ||
171 | #[cfg(feature = "png")] | ||
170 | pub fn write_png<W: io::Write>(&self, writer: W) -> png::Writer<W> { | 172 | pub fn write_png<W: io::Write>(&self, writer: W) -> png::Writer<W> { |
171 | convert::to_png(writer, self) | 173 | convert::to_png(writer, self) |
172 | } | 174 | } |