Mulder, images should be embedded in an ID3v2 tag, so you should be able to read and write them relatively easily:
http://www.id3.org/Developer_Information The link has plenty of information and I think there's even a GPL library that reads and writes id3v2 tags easily so you don't have to reinvent the wheel.