]>
diplodocus.org Git - flac-archive/blob - crap.cc
ed0e01d620c184b1053655a816759ef6fa49405a
12 #include <attachedpictureframe.h>
16 int main(int argc
, char *argv
[])
20 int fd
= open(argv
[2], O_RDONLY
);
21 char *m
= (char *)malloc(st
.st_size
);
22 read(fd
, m
, st
.st_size
);
24 TagLib::MPEG::File
f(argv
[1]);
25 TagLib::ID3v2::AttachedPictureFrame p
;
26 p
.setMimeType("image/jpeg");
27 p
.setType(TagLib::ID3v2::AttachedPictureFrame::FrontCover
);
28 TagLib::ByteVector bv
;
29 bv
.setData(m
, st
.st_size
);
31 TagLib::ID3v2::Tag
*t
= f
.ID3v2Tag(true);