mp3 id3v2 Toolkit Request

pkellum

Joined: 2005-04-13
Posts: 6
Posted: Wed, 2005-04-13 18:52

I've tried to figure out how to write a new toolkit (very confusing) to extract the album art image from an ID3v2 tag in an mp3 but am making no progress. I can extract the image and write it to a file as a stand-alone script, but I can't figure out how to turn it into a module. Also, I want to parse the extracted image through the graphics toolkit to resize it if needed but am unsure how. Would anyone be interested in working on this?

Patrick

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-04-13 19:14

we can certainly provide some guidance.
the best way to use the embedded image as an item thumbnail is to have your toolkit support the operation called 'convert-to-image/jpeg' for the mp3 mime type. G2 already attempts to use this operation to generate a thumbnail, and will still apply the requested thumbnail size afterwards to resize as needed.
perhaps look at modules/thumbnail as an example.. let us know if you have more questions.