get_pic.cpp

来自「更新mp3」· C++ 代码 · 共 41 行

CPP
41
字号
// $Id: get_pic.cpp,v 1.8 2002/06/29 17:25:05 t1mpy Exp $#ifdef HAVE_CONFIG_H#  include <config.h>#endif#include "id3/id3lib_streams.h"
#include <stdlib.h>#include <id3/tag.h>#include <id3/misc_support.h>using std::cout;using std::endl;int main( int argc, char *argv[]){  if (argc != 3)  {    cout << "Usage: get_pic <tagfile> <picfilename>" << endl;    return 1;  }    ID3_Tag tag(argv[1]);  const ID3_Frame* frame = tag.Find(ID3FID_PICTURE);  if (frame && frame->Contains(ID3FN_DATA))  {    cout << "*** extracting picture to file \"" << argv[2] << "\"...";    frame->Field(ID3FN_DATA).ToFile(argv[2]);    cout << " done!" << endl;  }  else  {    cout << "*** no picture frame found in \"" << argv[1] << "\"" << endl;    return 1;  }  return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?