| TagLib 1.13 |  |

Public Types | Public Member Functions | List of all members
TagLib::ASF::Picture Class Reference

An ASF attached picture interface implementation. More...

`#include <asfpicture.h>`

## Public Types
enum | Type { Other = 0x00 , FileIcon = 0x01 , OtherFileIcon = 0x02 , FrontCover = 0x03 , BackCover = 0x04 , LeafletPage = 0x05 , Media = 0x06 , LeadArtist = 0x07 , Artist = 0x08 , Conductor = 0x09 , Band = 0x0A , Composer = 0x0B , Lyricist = 0x0C , RecordingLocation = 0x0D , DuringRecording = 0x0E , DuringPerformance = 0x0F , MovieScreenCapture = 0x10 , ColouredFish = 0x11 , Illustration = 0x12 , BandLogo = 0x13 , PublisherLogo = 0x14 }

## Public Member Functions
| Picture ()
| Picture (const Picture &other)
virtual | ~Picture ()
Picture & | operator= (const Picture &other)
void | swap (Picture &other)
bool | isValid () const
String | mimeType () const
void | setMimeType (const String &value)
Type | type () const
void | setType (const ASF::Picture::Type &t)
String | description () const
void | setDescription (const String &desc)
ByteVector | picture () const
void | setPicture (const ByteVector &p)
ByteVector | render () const
int | dataSize () const

## Detailed Description

An ASF attached picture interface implementation.

This is an implementation of ASF attached pictures interface. Pictures may be included in attributes, one per WM/Picture attribute (but there may be multiple WM/Picture attribute in a single tag). These pictures are usually in either JPEG or PNG format.

See also
  Attribute::toPicture()
  Attribute::Attribute(const Picture& picture)

## Member Enumeration Documentation

## ◆ Type

enum TagLib::ASF::Picture::Type

This describes the function or content of the picture.

Enumerator
Other | A type not enumerated below.
FileIcon | 32x32 PNG image that should be used as the file icon
OtherFileIcon | File icon of a different size or format.
FrontCover | Front cover image of the album.
BackCover | Back cover image of the album.
LeafletPage | Inside leaflet page of the album.
Media | Image from the album itself.
LeadArtist | Picture of the lead artist or soloist.
Artist | Picture of the artist or performer.
Conductor | Picture of the conductor.
Band | Picture of the band or orchestra.
Composer | Picture of the composer.
Lyricist | Picture of the lyricist or text writer.
RecordingLocation | Picture of the recording location or studio.
DuringRecording | Picture of the artists during recording.
DuringPerformance | Picture of the artists during performance.
MovieScreenCapture | Picture from a movie or video related to the track.
ColouredFish | Picture of a large, coloured fish.
Illustration | Illustration related to the track.
BandLogo | Logo of the band or performer.
PublisherLogo | Logo of the publisher (record company)

## Constructor & Destructor Documentation

## ◆ Picture() [1/2]

TagLib::ASF::Picture::Picture | ( |  | ) |

Constructs an empty picture.

## ◆ Picture() [2/2]

TagLib::ASF::Picture::Picture | ( | const Picture & | other | ) |

Construct an picture as a copy of other.

## ◆ ~Picture()

virtual TagLib::ASF::Picture::~Picture | ( |  | ) |
| virtual

Destroys the picture.

## Member Function Documentation

## ◆ dataSize()

int TagLib::ASF::Picture::dataSize | ( |  | ) | const

Returns picture as binary raw data value

## ◆ description()

String TagLib::ASF::Picture::description | ( |  | ) | const

Returns a text description of the image.

See also
  setDescription()

## ◆ isValid()

bool TagLib::ASF::Picture::isValid | ( |  | ) | const

Returns true if Picture stores valid picture

## ◆ mimeType()

String TagLib::ASF::Picture::mimeType | ( |  | ) | const

Returns the mime type of the image. This should in most cases be "image/png" or "image/jpeg".

See also
  setMimeType(const String &)
  picture()
  setPicture(const ByteArray&)

## ◆ operator=()

Picture & TagLib::ASF::Picture::operator= | ( | const Picture & | other | ) |

Copies the contents of other into this picture.

## ◆ picture()

ByteVector TagLib::ASF::Picture::picture | ( |  | ) | const

Returns the image data as a ByteVector.

Note
  ByteVector has a data() method that returns a const char * which should make it easy to export this data to external programs.

See also
  setPicture()
  mimeType()

## ◆ render()

ByteVector TagLib::ASF::Picture::render | ( |  | ) | const

Returns picture as binary raw data value

## ◆ setDescription()

void TagLib::ASF::Picture::setDescription | ( | const String & | desc | ) |

Sets a textual description of the image to desc.

See also
  description()

## ◆ setMimeType()

void TagLib::ASF::Picture::setMimeType | ( | const String & | value | ) |

Sets the mime type of the image. This should in most cases be "image/png" or "image/jpeg".

See also
  setMimeType(const String &)
  picture()
  setPicture(const ByteArray&)

## ◆ setPicture()

void TagLib::ASF::Picture::setPicture | ( | const ByteVector & | p | ) |

Sets the image data to p. p should be of the type specified in this frame's mime-type specification.

See also
  picture()
  mimeType()
  setMimeType()

## ◆ setType()

void TagLib::ASF::Picture::setType | ( | const ASF::Picture::Type & | t | ) |

Sets the type for the image.

See also
  Type
  type()

## ◆ swap()

void TagLib::ASF::Picture::swap | ( | Picture & | other | ) |

Exchanges the content of the Picture by the content of other.

## ◆ type()

Type TagLib::ASF::Picture::type | ( |  | ) | const

Returns the type of the image.

See also
  Type
  setType()

The documentation for this class was generated from the following file:

- asfpicture.h