PNGReader

Reads an image using libpng. Image properties are specified at runtime. Lower-level interface.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Enums

Alpha
enum Alpha

Alpha channel presence.

AlphaLocation
enum AlphaLocation

Alpha channel location.

Channels
enum Channels

Color channels and order.

Depth
enum Depth

Color depth.

Functions

init
void init()

Initialize and begin decoding.

put
void put(ubyte[] data)

Feed image bytes into libpng.

Variables

alpha
Alpha alpha;

Alpha channel presence.

alphaLocation
AlphaLocation alphaLocation;

Alpha channel location.

channels
Channels channels;

Color channels and order.

defaultColor
ubyte[] defaultColor;

Background color when flattening alpha.

depth
Depth depth;

Color depth.

endHandler
void delegate() endHandler;

Callback for decoding end.

infoHandler
void delegate(int width, int height) infoHandler;

Callback for receiving image information.

passes
uint passes;

The number of passes needed to decode the image.

rowGetter
ubyte[] delegate(uint rowNum) rowGetter;

Callback for querying where to save an image row.

rowHandler
void delegate(uint rowNum, int pass) rowHandler;

Callback for image information.

rowbytes
size_t rowbytes;

Bytes in a row. rowGetter should return a slice of this length.

strict
bool strict;

Throw on corrupt / invalid data, as opposed to ignoring errors as much as possible.

Meta