dumping png file from dvbsub decoder using libpng