libtaginfo
0.2.0
|
Wrapper for image data and related information. More...
#include <taginfo_image.h>
Public Types | |
enum | FileType { TYPE_UNKNOWN, TYPE_JPEG, TYPE_PNG, TYPE_GIF, TYPE_BMP } |
enum | ContentType { CONTENT_OTHER, CONTENT_FILE_ICON, CONTENT_OTHER_FILE_ICON, CONTENT_COVER_FRONT, CONTENT_COVER_BACK, CONTENT_LEAFLET_PAGE, CONTENT_MEDIA, CONTENT_LEAD_ARTIST, CONTENT_ARTIST, CONTENT_CONDUCTOR, CONTENT_BAND, CONTENT_COMPOSER, CONTENT_LYRICIST, CONTENT_RECORDING_LOCATION, CONTENT_DURING_RECORDING, CONTENT_DURING_PERFORMANCE, CONTENT_MOVIESCREENCAPTURE, CONTENT_COLOURED_FISH, CONTENT_ILLUSTRATION, CONTENT_ARTIST_LOGO, CONTENT_PUBLISHER_LOGO } |
The enumeration type for the image content. More... | |
Public Member Functions | |
Image () | |
Image constructor. More... | |
~Image () | |
Image destructor. More... | |
const ByteVector | get_data () const |
char * | get_data (uint &image_data_length) const |
void | set_data (const char *image_data, const uint image_data_length) |
void | set_data (const ByteVector &image_data) |
Image::ContentType | get_content_type (void) const |
void | set_content_type (const Image::ContentType it) |
Image::FileType | get_file_type (void) const |
void | set_file_type (const Image::FileType ft) |
const String | get_description (void) const |
void | set_description (const String &description) |
Wrapper for image data and related information.
This class holds image data and information on loads and writes Internal memory is freed automatically.
The enumeration type for the image content.
Enumerated classification of image content
Enumerator | |
---|---|
CONTENT_OTHER |
An image type not listed here. |
CONTENT_FILE_ICON |
32x32 PNG image that should be used as the file icon |
CONTENT_OTHER_FILE_ICON |
File icon of a different size or format. |
CONTENT_COVER_FRONT |
Front cover image of the album. |
CONTENT_COVER_BACK |
Back cover image of the album. |
CONTENT_LEAFLET_PAGE |
Inside leaflet page of the album. |
CONTENT_MEDIA |
Image from the album itself. |
CONTENT_LEAD_ARTIST |
Picture of the lead artist or soloist. |
CONTENT_ARTIST |
Picture of the artist or performer. |
CONTENT_CONDUCTOR |
Picture of the conductor. |
CONTENT_BAND |
Picture of the band or orchestra. |
CONTENT_COMPOSER |
Picture of the composer. |
CONTENT_LYRICIST |
Picture of the lyricist or text writer. |
CONTENT_RECORDING_LOCATION |
Picture of the recording location or studio. |
CONTENT_DURING_RECORDING |
Picture of the artists during recording. |
CONTENT_DURING_PERFORMANCE |
Picture of the artists during performance. |
CONTENT_MOVIESCREENCAPTURE |
Picture from a movie or video related to the track. |
CONTENT_COLOURED_FISH |
Picture of a large, coloured fish. |
CONTENT_ILLUSTRATION |
Illustration related to the track. |
CONTENT_ARTIST_LOGO |
Logo of the band or performer. |
CONTENT_PUBLISHER_LOGO |
Logo of the publisher (record company) |
Image::ContentType Image::get_content_type | ( | void | ) | const |
Get the image content's type from the Image object.
const ByteVector Image::get_data | ( | ) | const |
Get image binary data
Get the image binary data from the Image object.
char * Image::get_data | ( | uint & | image_data_length | ) | const |
Get image binary data
image_data_length | is the return location for the length of the binary data array |
Get the image binary data from the Image object.
image_data_length | Return locatio for the length of the returned data array |
const String Image::get_description | ( | void | ) | const |
Get the image file's description from the Image object.
Image::FileType Image::get_file_type | ( | void | ) | const |
Get the image file's type from the Image object.
void Image::set_content_type | ( | const Image::ContentType | it | ) |
Set the image content's type in the Image object.
it | as ImageType |
void Image::set_data | ( | const char * | image_data, |
const uint | image_data_length | ||
) |
void Image::set_data | ( | const ByteVector & | image_data | ) |
Set image binary data
image_data | ByteVector with binary image data |
Set the image binary data in the Image object.
image_data | ByteVector with image data |
void Image::set_description | ( | const String & | new_description | ) |
Set the image file's description in the Image object.
new_description | as String |
void Image::set_file_type | ( | const Image::FileType | ft | ) |
Set the image file's type in the Image object.
ft | as ImageFileType |