summaryrefslogtreecommitdiff
path: root/src/env.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/env.rs')
-rw-r--r--src/env.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/env.rs b/src/env.rs
index 5746dd2f..aaa04aa2 100644
--- a/src/env.rs
+++ b/src/env.rs
@@ -84,6 +84,9 @@ pub struct ImageResource {
}
impl ImageResource {
+ /// Parse an image resource from raw data in a supported format.
+ ///
+ /// The image format is determined automatically.
pub fn parse(data: Vec<u8>) -> Option<Self> {
let reader = ImageReader::new(Cursor::new(data)).with_guessed_format().ok()?;
let format = reader.format()?;