3 unstable releases
| 0.2.1 | Apr 10, 2025 |
|---|---|
| 0.2.0 | Jan 20, 2025 |
| 0.1.0 | Jan 19, 2025 |
#1088 in Video
66 downloads per month
33KB
160 lines
Overview
This crate provides a simple API to generate thumbnails from a variety of file types.
Create and save a thumbmail using Thumbnailer:
use thumbnails::Thumbnailer;
let thumbnailer = Thumbnailer::new(250, 250);
let thumb = thumbnailer.get("video.mp4")?;
thumb.save("thumb.png")?;
Thumbnails
A thumbnailing library.
This crate converts various file formats into an image::DynamicImage of a user-specified size.
Supports images, videos, PDFs, and ZIP/CBZ archives.
API
Create a thumbnail:
use thumbnails::Thumbnailer;
let thumbnailer = Thumbnailer::new(250, 250);
let thumb = thumbnailer.get("video.mp4")?;
thumb.save("thumb.png")?;
Building
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
Dependencies
~54MB
~873K SLoC