apngasm library embedded, initial code taken from apngtest.cpp