APNG decoder functions