#thumbnail #image #ffmpeg #pdfium

thumbnails

Thumbnailing library. Converts various file formats into a smaller image.

3 unstable releases

0.2.1 Apr 10, 2025
0.2.0 Jan 20, 2025
0.1.0 Jan 19, 2025

#198 in Video

Download history 78/week @ 2025-01-13 141/week @ 2025-01-20 7/week @ 2025-02-03 2/week @ 2025-02-24 3/week @ 2025-03-03 124/week @ 2025-04-07 11/week @ 2025-04-14

135 downloads per month

AGPL-3.0-or-later

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

crates.io Documentation

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

~30–44MB
~706K SLoC