LazyPngFile

Lazily reads out basic info from a png (header, palette, image data) It will only allocate memory to read a palette, and only copies on the header and the palette. It ignores everything else.

FIXME: it doesn't handle interlaced files.

struct LazyPngFile (
LazyPngChunksProvider
) if (
isInputRange!(LazyPngChunksProvider) &&
is(ElementType!(LazyPngChunksProvider) == Chunk)
) {
LazyPngChunksProvider chunks;
PngHeader header;
Color[] palette;
}

Members

Functions

rawDatastreamByChunk
auto rawDatastreamByChunk(int chunkSize)

Lazily reads and decompresses the image datastream, returning chunkSize bytes of it per front. It does *not* change anything, so the filter byte is still there.

Meta