Last active
November 7, 2018 22:43
-
-
Save bernardobelchior/be1030ef421179e789e0799475eabc9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
lambda::gateway::start(|req| { | |
let base64_image: &str = req.body().as_str()?; | |
let image: Vec<u8> = base64::decode(base64_image)?; // Decode base64 image | |
let image: DynamicImage = load_from_memory(&image)?; // Convert image into `DynamicImage` | |
// ... | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment