I am currently trying to retrieve the Album Art from my MP3 files using the module MP3::Tag.
I currently have the following code after reading the documentation :
use MP3::Tag; my $mp3 = MP3::Tag->new("E:/My Music/File.mp3") or die “Can’t open Fil +e”; # Get the tags from the MP3 $mp3->get_tags; # Get the ID3 V2 tag where the picture is saved $id3v2 = $mp3->{ID3v2}; # Get the APIC frame from the Tag (The Image) which # returns a hash ref $Pic = $id3v2->get_frame("APIC"); # returns print "Content-type: image/jpeg\n\n"; print $Pic->{_Data};
If I just print $Pic->{_Data} to a text file with Binmode set, the file is not recognised as a valid image, however there is loads of binary data in the file.
My aim is for the script to return the Album Art image from a selected MP3 to the Browser.
I found the following documentation on CPAN http://search.cpan.org/~ilyaz/MP3-Tag-0.96/ID3v2-Data.pod but it only gives information on how to access the image data and not how to print it. I have searched the net and there is lots of examples on how to set the Album Art, but none to get it and print it to a browser.
Any one have any ideas / pointers?
Thanks,
Al
In reply to Get MP3 Album Art with MP3::Tag by allyc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |