module daffodil

ule provides the public interface for Daffodil.

Public Imports:

transform = daffodil.transform
bmp = daffodil.bmp
Format detectFormat(T)(T data) if (isDataRange!T)
auto detectFormat(T)(T loadeable) if (isLoadeable!T)
Format detectFormat(V = real)(const Image!V image) if (isColorValue!V)

Detects the Format a given input is in.

auto loadMeta(T)(T data) if (isDataRange!T)
auto loadMeta(T)(T loadeable) if (isLoadeable!T)

Loads the metadata from a given input.

auto load(V = real, T)(T data) if (isColorValue!V && isDataRange!T)
auto load(V = real, T)(T loadeable) if (isColorValue!V && isLoadeable!T)

Loads a Image from a given input.

void save(V = real, T)(const Image!V image, T data) if (isColorValue!V && isOutRange!T)
void save(V = real)(const Image!V image, string path) if (isColorValue!V)
void save(V = real, T)(const Image!V image, T saveable) if (isColorValue!V && isSaveable!T && !is(T == string))

Saves a particular Image to a given output.

alias DataRange = InputRange!ubyte
template isDataRange(T)
alias OutRange = OutputRange!ubyte
alias isOutRange = isOutputRange!(T, ubyte)
struct Format

A struct for metadata about an Image Format. See registerFormat for more information.

string name
bool function(DataRange) check
MetaData function(DataRange) loadMeta
ImageRange!PixelData function(DataRange, MetaData) loadImage
void function(OutRange, RandomAccessImageRange!(real[]), const MetaData) save
string[] extensions
TypeInfo metaType
void registerFormat(Format format)

Register a new format for auto-detection with detectFormat, loadMeta and load functions.