diff options
Diffstat (limited to 'src/env.rs')
| -rw-r--r-- | src/env.rs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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()?; |
