TagLib::ASF::Picture Class Reference

An ASF attached picture interface implementation. More...

`#include <asfpicture.h>`

## Public Member Functions

| Picture ()
| Picture (const Picture &other)
| ~Picture ()
Picture & | operator= (const Picture &other)
void | swap (Picture &other) noexcept
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. Pictures may be included in attributes, one per WM/Picture attribute (but there may be multiple WM/Picture attributes in a single tag). These pictures are usually in either JPEG or PNG format.

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

## Constructor & Destructor Documentation

## Picture() [1/2]

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

Constructs an empty picture.

References Picture().

Referenced by dataSize(), operator=(), Picture(), Picture(), setType(), swap(), and ~Picture().

## Picture() [2/2]

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

Construct a picture as a copy of other.

References Picture().

## ~Picture()

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

Destroys the picture.

References Picture().

## Member Function Documentation

## dataSize()

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

Returns picture as binary raw data value

References dataSize(), Picture(), and TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE.

Referenced by dataSize().

## description()

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

Returns a text description of the image.

See also
  setDescription()

References description().

Referenced by description().

## isValid()

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

Returns `true` if Picture stores valid picture

References isValid().

Referenced by isValid().

## 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&)

References mimeType().

Referenced by mimeType().

## operator=()

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

Copies the contents of other into this picture.

References 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()

References picture().

Referenced by picture().

## render()

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

Returns picture as binary raw data value

References render().

Referenced by render().

## setDescription()

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

Sets a textual description of the image to desc.

See also
  description()

References setDescription().

Referenced by setDescription().

## 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&)

References setMimeType().

Referenced by setMimeType().

## 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()

References setPicture().

Referenced by setPicture().

## setType()

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

Sets the type for the image.

See also
  Type
  type()

References Picture(), and setType().

Referenced by setType().

## swap()

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

noexcept

Exchanges the content of the Picture with the content of other.

References Picture(), and swap().

Referenced by swap().

## type()

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

Returns the type of the image.

See also
  Type
  setType()

References type().

Referenced by type().

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

- asfpicture.h