Pierre has posted his second look at working with the imagepng function today over on his blog.
In my first attempt to create smaller images, I only allowed to change the compression, it was not sufficient to get really lite pictures.
After a short look to the libpng codebase (and the horrible imagick doc), I added a last argument to imagepng, the filtering mode.
Bernhard Seefeld was testing the new compression option for imagepng and was wondering why there is still a relative big difference in image sizes.
He includes code later in the post, showing how to use this filtering option to make even smaller images (an option included from PHP 5.1.3 and up).