ID3v2 cover art insertion with Perl?

Hi, I'm struggling with my flac->mp3 music library maintenance script. based on some net articles I have used MP3::Tag to attach cover art this way use constant HEADER => ( chr(0x0) , "image/jpeg" , chr(0x0), ""); $img = new Image::Magick; if (! $img->Read("$flacdir/cover.jpg ")) { $id3v2->add_frame( "APIC", HEADER, $img->ImageToBlob(magick => 'jpg'));