Average of first 30 images (if there is 30) will be saved into average.png
PNG format was chosen for its loseless compression.
It makes no sense to re-introduce JPEG artefacts after spending so much time to remove them.