getid3

writing APIC to mp3 file with getid3 (id3v2)

耗尽温柔 提交于 2019-12-09 20:13:41
问题 I am trying to write APIC picture to mp3 file with getid3. here is the code; $cover = "/home/user/public_html/artwork/cover.jpg"; $TagData['attached_picture'][]=array( 'picturetypeid'=>2, // Cover. More: module.tag.id3v2.php -> function APICPictureTypeLookup 'description'=>'cover', // text field 'mime'=>'image/jpeg', // Mime type image 'data'=>$cover // Image data ); but it doesnt work. image size is around 1.5 MB. should i resize it or sth ? where am i wrong ? Thanks 回答1: Looking at the demo

writing APIC to mp3 file with getid3 (id3v2)

自作多情 提交于 2019-12-04 17:06:58
I am trying to write APIC picture to mp3 file with getid3. here is the code; $cover = "/home/user/public_html/artwork/cover.jpg"; $TagData['attached_picture'][]=array( 'picturetypeid'=>2, // Cover. More: module.tag.id3v2.php -> function APICPictureTypeLookup 'description'=>'cover', // text field 'mime'=>'image/jpeg', // Mime type image 'data'=>$cover // Image data ); but it doesnt work. image size is around 1.5 MB. should i resize it or sth ? where am i wrong ? Thanks Looking at the demo they have on their website: http://www.getid3.org/source/demo.write.phps snippet of code: $fd = fopen($