tiff-forge
A fork of the tiff-encoder crate which supports both TIFF and BigTIFF files with the desired IFDs and entries.
This crate allows to create any hierarchy of IFDs and to add any tags with any values to each. It does so while avoiding that the user needs to worry about the position of each structure in the file and to point to it with the correct offset.
The main structure of this crate, used to actually write the TIFF
file, is the TiffFile and BigTiff file. This structure writes
the file in Little Endian by default (but that can be changed) and requires an IfdChain.
This IfdChain consists of the first of the file, the one it points to (if any),
and so on. Each Ifd has one or more entries, which are represented
by a pair of FileTag and FieldValues
TIFF Example
Creating a 256x256 bilevel image with every pixel black.
extern crate tiff_encoder;
use *;
use tags;
BigTIFF Example
Creating a large, bilevel BigTIFF with every pixel black
// 300000*300000/8 = 11250000000
// The image data will have 11,250,000,000 bytes (~11.25GB) with 0 in every bit (each representing a
// black pixel).
let image_data = vec!;
new.write_to.unwrap;