App to Extract Embedded Cover Art - iLounge Forums
Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.

Topic: App to Extract Embedded Cover Art

Reply Thread Tools Topic Search
 
Old 06-02-2018, 08:35 AM
#1
 
Junior Lounger
 
Join Date: May 2010
Posts: 39
App to Extract Embedded Cover Art

Is there an app that would batch extract the cover art embedded into mp3s in iTunes and save them as .jpg or .png to your desktop) that anyone can suggest here?

Features that I'd love:
1. Ability to extract on a file by file basis

2. Ability to extract UNIQUELY by album (there could be 11 files in an album, but it would extract only one file assuming the same picture is being used for all 11 files. It'd be great if it'll give me two unique files if (in another example) there are 11 files and 10 of the 11 use the same file and 1 of the 11, for some reason, is using another file).

3. It could tell me the dimensions of the album art and the file type.

Thanks!
cucuzza is offline  
Reply With Quote
Old 06-03-2018, 06:48 PM
#2
 
Junior Lounger
 
Join Date: May 2010
Posts: 39

As an example, something like this (only for PC): https://dougscripts.com/itunes/scrip...p=savealbumart
cucuzza is offline  
Reply With Quote
Old 06-04-2018, 01:32 AM
#3
 

 
Join Date: Apr 2006
Location: Arizona
Posts: 9,182

Not that I know of, the scripts I have are very basic.

This is one for PC like Doug's but all it does is get the art from the selected tracks in your library.
And outputs them by song name and track number to C:\Windows\Temp

Save the text in the code block as GetArtwork.js
Open a command prompt where you saved the file.
Open iTunes
Select the tracks
In the command prompt type: wscript /nologo GetArtwork.js and press return.

You can use normal tools to see the size etc. The track number was there for songs with nearly duplicate names due to truncation.

You can change the output location to a different directory. This was one we should all have around.

Code:
var iTunesApp = WScript.CreateObject("iTunes.Application");
var mainLibrary = iTunesApp.LibraryPlaylist;
var tracks = iTunesApp.SelectedTracks;  //Remove leading slashes to only work on selected tracks, and comment out the next line.
//var tracks = mainLibrary.Tracks;  //Remove leading slashes to get all art from a library, and comment out the previous line.
var numTracks = tracks.Count;
var i;
var j;

for (i = 1; i <= numTracks; i++)
{
	var currTrack = tracks.Item(i);
	var artwork = currTrack.Artwork;

	for (j=1; j <=artwork.Count; j++) {
		var formatString ="";
		var currentArt = artwork.Item(j);
		var format = currentArt.Format;

		if (format == 1)
			formatString = ".jpg";
		else if (format == 2)
			formatString = ".png";
		else if (format == 0)
			formatString = ".bmp";

		if (formatString.length > 0) {
			var name = currTrack.Name.replace(/[#:?\\\/,\.\"\' ]+/g , "")+ currTrack.DiscNumber + "art_" + j;
			currentArt.SaveArtworkToFile("C:\\Windows\\Temp\\" + name + formatString);
		}
	}
}

WScript.Echo("Done");



Have you backed up your iTunes Library this week? If not, you are risking losing your music and playlists....
cjmnews is offline  
Reply With Quote

Topic: App to Extract Embedded Cover Art

Reply Thread Tools Topic Search

Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



RSS Feed Widget

iLounge Weekly
News, reviews, articles, giveaways, deals, and more delivered to your inbox.
Sign up for the iLounge Weekly Newsletter

iLounge is an independent resource for all things iPod, iPhone, iPad, and beyond.
iPod, iPhone, iPad, iTunes, Apple TV, Mac, and the Apple logo are trademarks of Apple Inc.
iLounge is © 2001 - 2016 iLounge, Inc. All Rights Reserved. Terms of Use | Privacy Policy