From Ilari Scheinin:
iTunes 7 can fetch album art also for tracks that were not bought from the iTunes Store. A lot of users, including me, have themselves added album art from a third party location (such as some web site) to tracks that were ripped from CDs. Often this is of quite poor resolution, and it would be nice to replace it with a version from the iTunes Store. Unluckily, this artwork prevents iTunes from fetching a replacement.
Provided are a couple of scripts to help out this situation. Please note that they are designed to work with music libraries that contain only one artwork per song. If you have songs with more than one piece of artwork, the scripts will not work as intended.
Please backup your data before running these scripts. The author takes no responsibility of potential data loss.
Remove third party album art.scpt
This script will go through your iTunes library (or just currently selected tracks) and remove album art that was not downloaded from the iTunes Store. The pictures are saved to allow later retrieval, but please do make a backup yourself as well.
After running this script, you should use iTunes to fetch album art from the iTunes Store.
Restore third party album art.scpt
This script will restore album art removed with the previous script to the tracks that are still missing album covers. It can be run for the entire library or only the currently selected tracks. Also, it can be used to overwrite the covers downloaded from the iTunes Store.
Fill in album artists.scpt
This is an additional script that will fill empty "Artist album" fields with data from the "Album" field.