The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

TagLib::ID3v2::AttachedPictureFrame - An ID3v2 attached picture frame implementation

SYNOPSIS

  use TagLib::ID3v2::AttachedPictureFrame;
  
  my $i = TagLib::ID3v2::AttachedPictureFrame->new();
  $i->setTextEncoding("UTF8");
  $i->setDescription(TagLib::String->new("utf8 sample string", "UTF8"));

DESCRIPTION

This is an implementation of ID3v2 attached pictures. Pictures may be included in tags, one per APIC frame (but there may be multiple APIC frames in a single tag). These pictures are usually in either JPEG or PNG format.

new()

Constructs an empty picture frame. The description, content and text encoding should be set manually.

new(ByteVector $data)

Constructs an AttachedPicture frame based on $data.

DESTROY()

Destroys the AttahcedPictureFrame instance.

String toString()

Returns a string containing the description and mime-type

PV textEncoding()

Returns the text encoding used for the description.

see setTextEncoding()

see description()

void setTextEncoding(PV $t)

Set the text encoding used for the description.

see description()

String mimeType()

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

void setMimeType(String $m)

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

PV type()

Returns the type of the image.

see setType()

see %_Type

void setType(PV $t)

Sets the type for the image.

see type()

see %_Type

String description()

Returns a text description of the image.

see setDescription()

see textEncoding()

see setTextEncoding()

void setDescription(String $desc)

Sets a textual description of the image to $desc.

see description()

see textEncoding()

see setTextEncoding()

ByteVector picture()

Returns the image data as a ByteVector.

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

see setPicture()

see mimeType()

void setPicture(ByteVector $p)

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

see picture()

see mimeType()

see setMimeType()

%_Type

This describes the function or content of the picture. keys %TagLib::ID3v2::AttachedPictureFrame::_Type lists all available values used in Perl code.

EXPORT

None by default.

SEE ALSO

TagLib Frame

AUTHOR

Dongxu Ma, <dongxu.ma@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Dongxu Ma

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.