GraphicsMagick is the swiss army knife of image processing. Comprised of 248K physical lines (according to SLOCCount) of source code in the base package (or 891K including 3rd party libraries) it provides a robust and efficient collection of tools and libraries which support reading, writing, and manipulating an image in over 88 major formats including important formats like DPX, GIF, JPEG, JPEG-2000, PNG, PDF, PNM, and TIFF.
Note: I haven’t tested this personally but I’ve been working for quite some time with the original framework (ImageMagick) and I’m really curious about this one and if it performs even better :-)