| Crates.io | thumbnails |
| lib.rs | thumbnails |
| version | 0.2.1 |
| created_at | 2025-01-19 02:08:35.342988+00 |
| updated_at | 2025-04-10 05:00:17.037121+00 |
| description | Thumbnailing library. Converts various file formats into a smaller image. |
| homepage | |
| repository | https://github.com/carrot-png/thumbnails |
| max_upload_size | |
| id | 1522452 |
| size | 106,176 |
This crate converts various file formats into an image::DynamicImage of a user-specified size.
Supports images, videos, PDFs, and ZIP/CBZ archives.
Create a thumbnail:
use thumbnails::Thumbnailer;
let thumbnailer = Thumbnailer::new(250, 250);
let thumb = thumbnailer.get("video.mp4")?;
thumb.save("thumb.png")?;
Some file types require additional setup and can be disabled via features if unneeded.
Video thumbnails depend on ffmpeg. See rust-ffmpeg
PDF thumbnails depend on pdfium. See pdfium-render