I have been looking into building a CarPC after the success of my HNC project a few years ago (a simple DOS car MP3 player with 4 line matrix display). I have experience with programming and thought that it would be cool to make my own front-end for my system as the winter is coming and there's not much to do after work. I am new to Visual Studio and the .NET stuff but have programmed VB 5 a few years ago. Anyway, I'll get to the point, I have managed to open an MP3 file and get data from it, Album, Title etc. but I can't find anywhere on the internet that explains how the album art is stored in the MP3 file.
Does anyone know how to get the artwork out of the file, as I think that displaying the art makes an MP3 player look very pro.
Yeah, I know that the album art is held inside the MP3 file, but my question was, how do I get Visual Basic to get the artwork from the file. If the MP3 file is opened as a binary source with VB, the last 128 characters hold the information, Track number, Album, Title etc. but what part of the file is the Artwork stored and how can I get VB to display it.
Here you go: http://www.id3.org/id3v2.3.0.html#sec4.15
Shouldn't be hard to implement at all. You are going to have to parse id3v2 tags. You probably want to do this anyways since otherwise you are limited to 32byte fields etc.. You can read further up on the id3.org specs and learn about frames. Basically it allows a variable amount of data to be stored.
Implementation shouldn't be -that- bad. I would recommend looking at something like libID3 and see how they did it. Then you need to load the jpg data into memory, and then get your program to display it. I don't know how .NET works, but you will probably need to load the data into a DIB or something then stick it in an ImageBox or bitblt it.
Speaking of album art, do any of you know of a way to get the album art INTO the files? I'd say 98% of my 50Gb of MP3's are from 2001 or before (college networks were great ). Unfortunately, this was pre album art being popular so most of mine are pictureless.
If you have iTunes on your computer and have all of your mp3's in the iTunes library, you can quite easily get album art onto your mp3 files. You get a piece of software called iTunes Art Importer!
All you do is run iTunes, and also run iTunes Art Importer. Now, you highlight all of the songs in a particular album and then click the search button on iTunes Art Importer. iTunes Art Importer then searches Amazon.com for any suitable artwork and displays it in a box. You simply select the artwork you want and click the download button. This then puts that artwork into the mp3 files that are selected on iTunes.
Hope that makes sence.