#thumbnail #image #ffmpeg #pdfium

thumbnails

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

3 unstable releases

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

#197 in Video

Download history 213/week @ 2025-01-15 6/week @ 2025-01-22 7/week @ 2025-02-05 5/week @ 2025-02-26 128/week @ 2025-04-09

128 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

~29–44MB
~704K SLoC