Skip to content

Instantly share code, notes, and snippets.

@bernardobelchior
Last active November 7, 2018 22:43
Show Gist options
  • Save bernardobelchior/be1030ef421179e789e0799475eabc9b to your computer and use it in GitHub Desktop.
Save bernardobelchior/be1030ef421179e789e0799475eabc9b to your computer and use it in GitHub Desktop.
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