imageio is a set of C functions that provide a simple way to read and write to a wide variety of file formats including JPEG, PNG, TIFF, and many others. This code is particularly useful for loading textures into OpenGL or other programs. When the programmer wishes to write to a file, they simply fill in a one-dimensional array of grayscale, RGB, RGBA (or similar) data in row-major order and pass the array and filename information imageout(). The process works in reverse when reading images with imagein().
This software must be compiled against ImageMagick.
imageio source code