A. Molzer f6e2aeffe5 Encode values immediately
This currently avoids buffering the collection, but not buffering them
individually where we still format it into a byte vector.

The main drive here is making the DirectoryEncoder less dependent on the
values. That is, it should be concerned with the Entry representation of
values only. A few decoders expect all values to strictly follow the
image directory and the data layout of such files should be controllable
by the user. This could be achieved by encoding dummy entries which are
later corrected once the actual item is known by seeking back and
writing the directory anew.

By no longer assuming values to be available on finishing a directory we
also prepare an interface that encodes an existing directory.
2025-07-13 03:06:40 +02:00
2025-07-13 03:06:40 +02:00
2025-07-13 03:06:40 +02:00
2018-03-12 18:26:44 +01:00
2025-06-20 20:15:42 -07:00
2018-03-12 13:43:42 +01:00

image-tiff

Build Status Documentation Further crate info

TIFF decoding and encoding library in pure Rust

Supported

Features

  • Baseline spec (other than formats and tags listed below as not supported)
  • Multipage
  • BigTIFF
  • Incremental decoding

Formats

This table lists photometric interpretations and sample formats which are supported for encoding and decoding. The entries are ColorType variants for which sample bit depths are supported. Only samples where all bit depths are equal are currently supported. For example, RGB(8) means that the bit depth [8, 8, 8] is supported and will be interpreted as an 8 bit per channel RGB color type.

PhotometricInterpretation UINT Format IEEEFP Format
WhiteIsZero Gray(8|16|32|64) Gray(32|64)
BlackIsZero Gray(8|16|32|64) Gray(32|64)
RGB RGB(8|16|32|64), RGBA(8|16|32|64) RGB(32|64), RGBA(32|64)
RGBPalette
Mask
CMYK CMYK(8|16|32|64) CMYK(32|64)
CMYKA CMYKA(8)
YCbCr
CIELab

Compressions

Decoding Encoding
None ✓ ✓
LZW ✓ ✓
Deflate ✓ ✓
PackBits ✓ ✓
JPEG ✓ not yet
ZSTD ✓ not yet

Not yet supported

Formats and interpretations not listed above or with empty entries are unsupported.

  • Baseline tags
    • ExtraSamples
  • Extension tags

Fuzzing

This crate uses cargo-fuzz in order to test the image parser.

After installing it with cargo install cargo-fuzz on a nightly rustc, the fuzzing harness can be run with recommended settings using cargo fuzz run decode_image -snone -- -timeout=5.

S
Description
Fork of https://github.com/image-rs/image-tiff, modifying the tiff crate to be able to read RGBPalette tiffs.
Readme MIT
14 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 88.1%
C 11.5%
Shell 0.4%