Is there a way to programmatically extract cover art?

In the Buttons area you'll find a useful post: Set/Clear/Extract WMA/MP3 Cover-art + Populate AlbumArtist