Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Adding "album art" to MP3s ...

by andyford (Curate)
on Oct 24, 2007 at 13:05 UTC ( #646886=note: print w/replies, xml ) Need Help??

in reply to Adding "album art" to MP3s ...

#!/usr/bin/perl use warnings; use strict; use MP3::Tag; my $artfile = 'barred-spiral-NGC1512.jpg'; my $art; { local $/=undef; open my $jpg,'<', $artfile or die "Couldn't open file: $!"; binmode $jpg; $art = <$jpg>; close $jpg; } my $mp3 = MP3::Tag->new('Andrew_Ford__Cygnus_X1_Trawler.mp3'); $mp3->get_tags(); $mp3->{ID3v2}->change_frame("APIC", chr(0x0), 'image/jpeg', chr(0x0), +'Cover Art', $art); $mp3->update_tags(); $mp3->close();

non-Perl: Andy Ford

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://646886]
LanX zooming holli s picture seeking onion
[holli]: Oh, seems like LanX' team has won the fourth World Cup ... awesome!
LanX grins
[marto]: anyway, don't come to Glasgow for the football :)
[holli]: the hell? i have a scriptblocker on.
[holli]: how do you update a different window without javascript?
[holli]: ah, chatterbox right
[marto]: it's a normal HTML form, with some hidden input fields
[holli]: forgot that thing exists for a moment.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2017-12-14 16:10 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (398 votes). Check out past polls.