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

An ASF attached picture interface implementation. More...

#include <asfpicture.h>

Public Member Functions

 Picture ()
 
 Picture (const Picture &other)
 
 ~Picture ()
 
Pictureoperator= (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.

◆ Picture() [2/2]

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

Construct a picture as a copy of other.

◆ ~Picture()

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

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)
noexcept

Exchanges the content of the Picture with 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: