in reply to Re^2: Get MP3 Album Art with MP3::Tag
in thread Get MP3 Album Art with MP3::Tag

You have to set binmode to STDOUT just like you did to the file. This example works off Windows running Apache2 and ActiveState perl 5.8
#!C:/Perl/bin/perl use MP3::Tag; my $mp3 = MP3::Tag->new("withimage.mp3") or die "no File"; $mp3->get_tags; $id3v2 = $mp3->{ID3v2}; my $Pic = $id3v2->get_frame("APIC"); # returns print "Content-type:image/jpeg\r\n\r\n"; binmode STDOUT; print STDOUT $Pic->{_Data};
jtrue

Replies are listed 'Best First'.
Re^4: Get MP3 Album Art with MP3::Tag
by allyc (Scribe) on Jul 21, 2005 at 23:44 UTC
    Thank you so much jtrue!

    The penny finaly drops.... should have realised that I needed to set binmode on STDOUT as well.... oh well we live and learn!

    Thank you so much for your help

    Al