Simplest possible png writer based on libpng