APNG decode functions.