This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
There's example code that shows how to compress an image to a JPEG here. It's possible that it works out of the box with PNGs as well (I'm not sure about the algorithms PNG uses), or -worst case- you can write a JPEG in the desired quality/compression, read it back into memory, and then write it as a PNG.