rusty_tiff: The libtiff Alternative Remade in Rust
rusty_tiff 0.1.1 is a pure-Rust TIFF and BigTIFF codec. Strips, tiles, LZW, G4 and JPEG-in-TIFF, no C, no unsafe, and no panics on damaged files.

What is rusty_tiff and what does it replace?
rusty_tiff is a pure-Rust TIFF and BigTIFF decoder and encoder with no C and no unsafe code. Version 0.1.1 shipped on 20 November 2026 under Apache-2.0, and it replaces libtiff and the tiff crate.
A TIFF is the file people keep. A flatbed scanner saves one, a fax server stores one, a museum archives its masters as one, and a DNG raw photo hides TIFF structure inside. Underneath most of that sits libtiff, a C library that walks tag directories and strip offsets written by whoever made the file. rusty_tiff replaces that reader with Rust: a TIFF and BigTIFF decoder and encoder, no C anywhere, and forbid(unsafe_code) across the crate. The November 20 release, 0.1.1, is Apache-2.0. Its code lives in the remade_ffmpeg_rs monorepo, the public crate card is on Remade with Rust, and MATA's landing for it is here.
Trust means a scan opens on the machine that owns it. Security means a file that lies about its own length gets an error back, not a buffer overrun. Incentive means the safe choice is also quicker than libtiff on the compression archives use most. What follows covers the formats, the behavior on broken files, and the place this codec takes in a home that keeps its own documents.
Why rusty_tiff Replaces libtiff on the Archive Path
TIFF is less a picture format than a container of tagged directories. Each directory points at strips or tiles elsewhere in the file, names a compression scheme, and declares sizes a decoder is asked to believe. The Library of Congress format description shows how much the specification permits, and the IETF media type registration, RFC 3302, shows how long the format has travelled by mail and over the web. Every offset and count in there is input from a stranger.
That is where C readers get hurt. A wrong strip count or an oversized tile turns into a read past the end of a buffer. The NIST Secure Software Development Framework and CISA's case for memory safe roadmaps both name one remedy: write parsers like this in a memory-safe language. A Rust slice cannot be indexed past its end, and the crate forbids the unsafe blocks that would let anyone try.
Wrapping libtiff behind FFI does not count as a remake. It adds a Rust handshake in front of the same C heap. This crate stands in for libtiff and for the pure-Rust tiff crate alike, so a program can drop the C library and keep a decoder that holds its pace.
What the Decoder Reads and Writes
The scope is the TIFF that real files use, not a baseline subset. Both directions shipped together, which matters for an archive: a tool that reads a scan but cannot save one still needs libtiff behind the save button.
Strips, Tiles and BigTIFF
Horizontal strips, which most scanners produce, and square tiles, which very large images prefer, are both handled for reading and writing. BigTIFF, the 64-bit offset variant for files past 4 GB, goes through the same code. Compression covers LZW, Deflate, PackBits, CCITT G3 and G4 for black-and-white faxes and document scans, and JPEG-in-TIFF. Float samples and predictors are supported, so scientific and elevation data does not need a second library.
Multipage Files and DNG's TIFF Layer
A multipage TIFF is a stack of directories, one per page. A faxed contract or a scanned book usually arrives as one file with many pages, and the decoder walks them in order. SubIFDs are covered too. DNG raw photos use that mechanism to keep a full-size image, a preview and metadata in one structure, so the TIFF layer of a DNG opens here. Demosaicing the sensor data is a separate job. EXIF, ICC and XMP tags come through intact, which keeps camera settings, the color profile and the edit history attached to the picture.
An Error Instead of a Panic
Two rules guard what comes out. On good files, output is pixel-identical to image-tiff across its test matrix, so switching a program over does not quietly repaint an archive. On bad files, malformed input returns an error and never panics. The new release was run against 18,024 damaged TIFFs without a single panic. Of the 141 files that tiff 0.11 decoded but the first release refused, 128 now decode, and 806 files that both refused now open as well. The release field note carries the instruction counts behind those changes.
Where a Memory-Safe TIFF Decoder Fits at Home
MATA's Era 3 is the Home Computer: documents, scans and media kept on hardware the family holds. That only works if the machine can open what it stores without shipping the file to a converter somewhere else.
Scans Stay on the Home Computer
Tax records, deeds, old letters and photo negatives tend to arrive as TIFF because scanners default to it. Bringing files home puts those scans on the Home Computer, and owning your files without Google Drive means no cloud service renders the thumbnail. A decoder that refuses to crash is what makes that local path safe to run over every file in the drawer, including the ones from a scanner nobody has updated in a decade.
The EFF has spent years showing how "we process it in the cloud" turns into "we kept a copy." Decoding at home removes the reason to upload.
Siblings for Small Formats and Color
Two crates from the same workspace shipped alongside it. rusty_image handles BMP, icons, TGA, PNM, Radiance HDR and QOI. rusty_icc applies the color profile a TIFF often carries in its ICC tag. Web formats stay with rusty_png and rusty_jpeg, and the pipeline around all of them is remade_ffmpeg_rs.
Pinning rusty_tiff
cargo add rusty_tiff pulls the current version from crates.io. There is no C build step, so it compiles for a mesh node or a WASM target the same way it compiles on a laptop. On speed, G4 decode runs 4–6× faster than the tiff crate and 1.3–1.6× faster than libtiff, and uncompressed decode ties tiff 0.11 while beating libtiff by 1.10–1.12×. The whole family is listed in MATA's Remade with Rust catalog, and why Remade with Rust matters explains why that catalog exists at all.
FAQ
Short answers already in this article.
Which TIFF compression schemes does rusty_tiff read?
rusty_tiff handles strips and tiles with LZW, Deflate, PackBits, CCITT G3 and G4, and JPEG-in-TIFF. It also reads float samples and predictors, multipage files, SubIFDs, and EXIF, ICC and XMP tags.
Does rusty_tiff crash on a damaged TIFF file?
No. Malformed input returns an error and never panics. On an 18,024-file set of damaged TIFFs, version 0.1.1 had no panics, and it opened 806 files that both the tiff crate and rusty_tiff 0.1.0 refused.
Is rusty_tiff output the same as image-tiff?
Yes on its test matrix. rusty_tiff decodes pixel-identical to image-tiff there, so moving a program over does not repaint its scans.
Can rusty_tiff read the TIFF layer of a DNG raw photo?
rusty_tiff reads SubIFDs, which is how a DNG raw file stores its TIFF structure, along with multipage files and the EXIF, ICC and XMP tags a camera writes. Raw demosaicing is a separate job.
Where does the rusty_tiff source live?
In the remade_ffmpeg_rs monorepo on GitHub, under crates/rusty_tiff. The published crate is rusty_tiff on crates.io, and cargo add rusty_tiff pins version 0.1.1.

