This simple program below fails. It seems to be adding the file and setting up most of the stuff, but no matter what I do the PIC's 'imageformat' property gets set to zero.
---
using namespace std;
int main(int argc, char* argv[])
{
if (argc < 2)
{ cout << "No input file" << endl;
return 1;
}
cout << "scanning file " << argv[1] << endl;
ID3_Tag myTag(argv[1]);
int out_size = ID3_GetPictureData(&myTag, "album_2.png");
ID3_AddPicture(&myTag, "album_2.png", "", true);
myTag.Update(ID3TT_ID3V2);
return 0;
}
---
here's the id3info dump of a file that I run through this program. Note that the APIC parameter is missing the PNG that you see in a correct MP3 file.
*** 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