diff options
author | Akshay <[email protected]> | 2021-04-23 12:46:33 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-04-23 12:46:51 +0100 |
commit | 7773bfb4c63ab3ea49b428e20ef0946b713fd5f5 (patch) | |
tree | 3bd1e71acfd70bb470d15672c90cbaa410a6b5e7 /src/lib.rs | |
parent | 390ec1081fc29832b2ca7fc0f4234280c84105cd (diff) |
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | use std::io; | 5 | use std::io; |
6 | 6 | ||
7 | pub mod convert; | ||
7 | mod decode; | 8 | mod decode; |
8 | mod encode; | 9 | mod encode; |
9 | pub mod error; | 10 | pub mod error; |
@@ -165,4 +166,8 @@ impl Image { | |||
165 | pub fn decode(data: &mut io::Cursor<Vec<u8>>) -> OBIResult<Image> { | 166 | pub fn decode(data: &mut io::Cursor<Vec<u8>>) -> OBIResult<Image> { |
166 | decode::decode_image(data) | 167 | decode::decode_image(data) |
167 | } | 168 | } |
169 | |||
170 | pub fn write_png<W: io::Write>(&self, writer: W) -> png::Writer<W> { | ||
171 | convert::to_png(writer, self) | ||
172 | } | ||
168 | } | 173 | } |