[id3lib-devel] Help setting a picture in the tag
Brought to you by:
t1mpy
From: Matt W. <wa...@gm...> - 2009-12-06 04:36:28
|
Hi all: I've gotten just about everything to work with this lib, including READING pic's, but writing pic's seems to break. Here's a simple program that yields an MP3 file with an image nothing seems able to parse: int main(int argc, char* argv[]) { if (argc < 2) { return 1; } ID3_Tag myTag(argv[1]); ID3_AddPicture(&myTag, "album_2.png", "", true); myTag.Update(ID3TT_ID3V2); return 0; } When I look at the id3info dump for this file, I see the following. Note the 'APIC' entry is missing the 'PNG': *** Tag information for klf_2.mp3 === TIT2 (Title/songname/content description): Brownsville Turnaround On The Tex-Mex Border === TPE1 (Lead performer(s)/Soloist(s)): The KLF === TCOM (Composer): Bill Drummond/Jimmy Cauty === TALB (Album/Movie/Show title): Chill Out === TRCK (Track number/Position in set): 1/14 === TPOS (Part of a set): 1/1 === TYER (Year): 1990 === COMM (Comments): (iTunPGAP)[eng]: 0 === TENC (Encoded by): iTunes 8.0.2 === COMM (Comments): (iTunNORM)[eng]: 00000042 0000003E 000003EF 000003F5 000194E5 00011B29 000054D0 000055E0 000194CB 00011B78 === COMM (Comments): (iTunSMPB)[eng]: 00000000 00000210 00000888 0000000000480BE8 00000000 0020A110 00000000 00000000 00000000 00000000 00000000 00000000 === COMM (Comments): (iTunes_CDDB_IDs)[eng]: 14+6088698BB25B4CA0B83F2E3AF88853F7+750432 === UFID (Unique file identifier): http://www.cddb.com/id3/taginfo1.html, 54 bytes === COMM (Comments): ()[eng]: Cleaned by TuneUp! === TPE2 (Band/orchestra/accompaniment): The KLF === TCON (Content type): Alternative Dance === APIC (Attached picture): ()[, 0]: , 188839 bytes *** mp3 info Compared to the same mp3 with the same picture (properly) put in that does have the 'PNG'. *** Tag information for klf.mp3 === TT2 (Title/songname/content description): Brownsville Turnaround On The Tex-Mex Border === TP1 (Lead performer(s)/Soloist(s)): The KLF === TCM (Composer): Bill Drummond/Jimmy Cauty === TAL (Album/Movie/Show title): Chill Out === TRK (Track number/Position in set): 1/14 === TPA (Part of a set): 1/1 === TYE (Year): 1990 === COM (Comments): (iTunPGAP)[eng]: 0 === TEN (Encoded by): iTunes 8.0.2 === COM (Comments): (iTunNORM)[eng]: 00000042 0000003E 000003EF 000003F5 000194E5 00011B29 000054D0 000055E0 000194CB 00011B78 === COM (Comments): (iTunSMPB)[eng]: 00000000 00000210 00000888 0000000000480BE8 00000000 0020A110 00000000 00000000 00000000 00000000 00000000 00000000 === COM (Comments): (iTunes_CDDB_IDs)[eng]: 14+6088698BB25B4CA0B83F2E3AF88853F7+750432 === UFI (Unique file identifier): http://www.cddb.com/id3/taginfo1.html, 54 bytes === COM (Comments): ()[eng]: Cleaned by TuneUp! === TP2 (Band/orchestra/accompaniment): The KLF === TCO (Content type): Alternative Dance === PIC (Attached picture): ()[PNG, 0]: , 188839 bytes *** mp3 info I have also tried doing this manually by setting up the frame myself. No matter what I do, the ID3FN_IMAGEFORMAT paramter never actually gets written out - which is my only clue right now. I even made sure my image file is valid by extracting it from a the known-good mp3 file. HELP! -mw |