libtaginfo  0.2.0
taginfo_image.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Jörn Magens
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This Program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; see the file LICENSE. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth
17  * Floor, Boston, MA 02110-1301 USA
18  * https://www.gnu.org/licenses/lgpl-2.1.txt
19  *
20  * Author:
21  * Jörn Magens <shuerhaaken@googlemail.com>
22  */
23 
24 
25 #ifndef TAGINFO_IMAGE_H
26 #define TAGINFO_IMAGE_H
27 
28 #include "taginfo.h"
29 
30 using namespace TagLib;
31 
32 
36 namespace TagInfo {
37 
39 
43  class Image {
44  public:
46 
49  enum FileType {
59  TYPE_BMP
60  };
61 
62 
64 
67  enum ContentType {
109  CONTENT_PUBLISHER_LOGO
110  };
111 
113 
116  Image();
117 
119 
122  ~Image();
123 
126  const ByteVector get_data() const;
127 
131  char * get_data(uint &image_data_length) const;
132 
136  void set_data(const char * image_data, const uint image_data_length);
137 
140  void set_data(const ByteVector &image_data);
141 
142  Image::ContentType get_content_type(void) const;
143  void set_content_type(const Image::ContentType it);
144 
145  Image::FileType get_file_type(void) const;
146  void set_file_type(const Image::FileType ft);
147 
148  const String get_description(void) const;
149  void set_description(const String &description);
150 
151  private:
153  ByteVector bytes;
156  ContentType image_type;
157 
160  FileType image_file_type;
161 
164  String description;
165  };
166 }
167 
168 #endif
Picture of the lyricist or text writer.
Definition: taginfo_image.h:93
Gif file type.
Definition: taginfo_image.h:57
Logo of the band or performer.
Definition: taginfo_image.h:107
Picture of the band or orchestra.
Definition: taginfo_image.h:89
Jpg file type.
Definition: taginfo_image.h:53
Picture of the conductor.
Definition: taginfo_image.h:87
Picture of the artists during recording.
Definition: taginfo_image.h:97
Image from the album itself.
Definition: taginfo_image.h:81
32x32 PNG image that should be used as the file icon
Definition: taginfo_image.h:71
Wrapper for image data and related information.
Definition: taginfo_image.h:43
File icon of a different size or format.
Definition: taginfo_image.h:73
Picture of a large, coloured fish.
Definition: taginfo_image.h:103
Picture from a movie or video related to the track.
Definition: taginfo_image.h:101
FileType
Definition: taginfo_image.h:49
Front cover image of the album.
Definition: taginfo_image.h:75
ContentType
The enumeration type for the image content.
Definition: taginfo_image.h:67
Back cover image of the album.
Definition: taginfo_image.h:77
Picture of the artist or performer.
Definition: taginfo_image.h:85
Illustration related to the track.
Definition: taginfo_image.h:105
Picture of the composer.
Definition: taginfo_image.h:91
Inside leaflet page of the album.
Definition: taginfo_image.h:79
Picture of the lead artist or soloist.
Definition: taginfo_image.h:83
Picture of the artists during performance.
Definition: taginfo_image.h:99
Picture of the recording location or studio.
Definition: taginfo_image.h:95
An image type not listed here.
Definition: taginfo_image.h:69
Unknown image file type.
Definition: taginfo_image.h:51
Png file type.
Definition: taginfo_image.h:55