PNGDIB is a C library that makes it easy to convert between DIB (or BMP) images and PNG images.
Sample programs are included which convert between BMP image files and PNG image files. Also included is a simple PNG viewer.
The API for version 3.x is very different from the one in previous versions. The new API is intended to make it easier to add new features.
View the readme file for details.
Download: pngdib-3.1.0.zip (4 Jul 2010; 170 KB)
Requires libpng and zlib
This code has not been rigorously tested, and may have some bugs. Use at your own risk.
PNGDIB is for Windows (Win32) only. It could be ported to other platforms if you really wanted it, but it would take a bit of effort (also, a decompression algorithm would need to be added if you want to support reading compressed DIBs).
There's some other imaging utilities at my home page.