Apology: I miss-responded in that last post -- you can probably figure out what went wrong!
Now, as for source code... I can't think of any offhand. As long as you can do decent file-handling, the specs for assorted image formats are all over the net. I've got -- or had, somewhere -- the specs for tiffs, gifs, and picts... if nothing else, consult the ADPA or Symantec's THINK people....