For those of us who need a »near-perfect« collection because they are enthusiasts or use all this for work (i.e., for displaying uniform covers on a radio page), here is a little »How to« to (quite) easily reach the goal of »uniform cover images«.
The Goals:
- One uniform Cover Image within each audio file, all 160x160 Pixels, 72 dpi, non-square original images filled with white background, all line interlaced JPEG (other source image formats being converted), small memory footprint for use on a web page and in portable devices.
- One original (big) cover image per album folder.
- One (auto-generated) (small) cover thumbnail per album folder.
- Source image must either come from external source or from audio file containing such.
- Image file names should be "%albumartistsort% - %album%.cover.*" (Original cover image, nearly any format) and "%albumartistsort% - %album%.thumb.jpg" (Good-quality thumbnail, for inclusion in audio file).
- Procedure should not fail if there is no %albumartistsort% in tag, but use %artist% instead for such cases.
- MP3Tag version new enough to handle the "Tools".
- Working installation of ImageMagick v6.3.2 or newer. (A great commandline image processing tool set.)
- At least the tags %album% and either or both %albumartistsort% and %artist% must be filled in before all this works.
- Existing cover images (Either downloaded and saved as "%albumartistsort% - %album%.cover." within the album folder, or at least one audio file per album that has a usable cover embedded.
We will use a setup consisting of three separate parts, since it’s currently not possible to do this all in one action group:
- An Action »Export Cover« in case we need to extract the covers from the audio files first. (I recommend running this on the whole collection so all »embedded« covers get extracted. The next step would be to download the missing ones and save them in the respective album folders.) Strictly spoken, it needs only to be run on any one file per album (if it contains a cover image, that is!).
- A Tool named »Convert album cover art to 160x160px, 72dpi« that will use some ImageMagick to make nice little thumbnails. You can of course adapt the parameters to whatever you need. This tool will be used to create the small album cover image (one per album folder) from either the extracted or the downloaded »big« album cover. Remember: The original cover image can be almost any format, and it doesn’t have to be square! This tool needs only to be run on one file per album (just to get the name).
- An Action »Import Cover« to first delete whatever cover data is embedded in the audio file, then import our new thumbnail into it. This will later be run on all files that should get a cover.
$if(%albumartistsort%,%albumartistsort%,%artist%) - %album%.cover
[_] Export duplicate covers
Tool »Convert album cover art to 160x160px, 72dpi«:
Name: Convert album cover art to 160x160px, 72dpi
Path: C:\Programme\ImageMagick\convert.exe
(or whereever you have installed ImageMagick to—important is to select »convert.exe«)
Parameter: "$if(%albumartistsort%,%albumartistsort%,%artist%) - %album%.cover.*" -thumbnail 160x160 -background white -gravity center -extent 160x160 -density 72x72 -quality 90 -interlace line "$if(%albumartistsort%,%albumartistsort%,%artist%) - %album%.thumb.jpg"
[x] for all selected files
This is not very elegant yet—anybody got a better idea? Maybe come up with yet another Export loop creating a batch file instead? Strictly spoken, this should only be executed once per album, so if you mark all audio files, it will do lots of unneeded processing. Since I usually work on one album at a time, I found it convenient enough and just activate it for any one music file per album. Remember: %album% and either %albumartistsort% or %artist% must be already set for this to work! Of course, you should also have a properly named image file in the folder (but it will do nothing if none is found).
Action »Import Cover«:
Import cover from file
Format string for image filename: $if(%albumartistsort%,%albumartistsort%,%artist%) - %album%.thumb.jpg
[x] Delete existing cover art
This will remove all covers already in your selected audio file(s), and then import the cover file we generated using the ImageMagick Tool above.
Done! Enjoy with care. (And let me know about any improvements you make