I had a look at matplotlib. It is very similar to what I did (I mean, it's just a call to libpng, there is just a few variations on the same theme), but not as flexible as they are not using anything but libpng.Luis