Open an image file in a Rust program, resize it to new dimensions, and save it in a different format such as converting PNG to JPEG.
Build a batch thumbnail generator that reads any common image format and outputs a small preview file.
Apply image processing operations like blur, grayscale, or brightness adjustment to user-uploaded photos in a web service.
Build a Rust program that converts a folder of images between formats without writing any file-format parsing code.
Some formats require enabling specific feature flags in Cargo.toml, debug builds run slowly so use release mode for performance work.
This is a Rust library for reading and writing image files. If you are building a program in Rust that needs to open a photo, modify it, and save it back out, this library handles the file format details so you do not have to. It can read and write a wide range of common image formats: PNG, JPEG, GIF, WebP, TIFF, BMP, ICO, AVIF, and several others are all supported out of the box. You load an image from disk, get back an object you can inspect or transform, and then write it out to any supported format. The library also includes a set of image processing operations you can apply: resize an image to new dimensions, crop a region out of it, rotate or flip it, convert it to grayscale, adjust brightness or contrast, apply a blur, and more. All of these work on the same image objects the library creates when you open a file. For developers, the library is organized around a few core types. A DynamicImage is the general-purpose container you get when opening a file. An ImageBuffer is a more specific type tied to a particular pixel format, like RGB or RGBA. The library also defines traits that let other crates plug in additional format support, so if you need a format not included by default you can often find a third-party crate that adds it. The README notes that some processing functions run slowly in debug builds and recommends using release mode for any performance-sensitive work. It also recommends that library authors disable the default feature set and opt in only to the specific formats they need, to keep dependency sizes down. This is a mature, actively maintained library used across many Rust projects that involve images.
← image-rs on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.