readApng

Loads an apng file.

readApng
(
in ubyte[] data
,
bool strictApng = false
,
scope ApngAnimation delegate
()
factory = null
)

Parameters

data ubyte[]

the raw data bytes of the file

strictApng bool

if true, it will strictly interpret the file as apng and ignore the default image. If there are no animation chunks, it will return an empty ApngAnimation object.

If false, it will use the default image as the first (and only) frame of animation if there are no apng chunks.

factory ApngAnimation delegate
()

factory function for constructing the ApngAnimation object the function returns. You can use this to override the allocation pattern or to return a subclass instead, which can handle custom chunks and other things.

Meta

History

Parameter strictApng added February 27, 2021 Parameter factory added December 26, 2021