π¦ Exploring Rust crates zip & image (Twitch live stream)
In this video, we explored the crates `zip` and `image` and built a little Rust CLI that can decompress images from a zip file and create thumbnails for them.
- Zip crate: https://crates.io/crates/zip
- Image crate: https://crates.io/crates/image
- Our code repository: https://github.com/lmammino/unzip-and-resize-images
Chapters:
00:00:00 Intro
00:01:28 Overview of the project
00:04:05 Overview of the zip crate
00:07:14 Reading arguments from the CLI
00:10:20 How to open a file
00:14:28 How Rust manages files using RAII
00:15:40 Using the zip crate
00:22:43 Using the image crate
00:37:15 Resizing the images with resize_to_fill()
00:41:30 Saving the image to the local filesystem
00:48:33 Handling file extensions using std::Path file_stem() method
00:55:45 Converting Option types into Result types with .ok_or()
01:00:05 Getting the target image size from a CLI argument
01:04:03 Wrapping up
To see the next episodes live check out our Twitch channel: https://twitch.tv/loige
#rust #zip #image