Audio-TagLib

 view release on metacpan or  search on metacpan

lib/Audio/TagLib/ID3v2/AttachedPictureFrame.pm  view on Meta::CPAN

Dongxu

=end stopwords

=head1 NAME

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

=head1 SYNOPSIS

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

=head1 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.

=over

=item I<new()>

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

=item I<new(L<ByteVector|Audio::TagLib::ByteVector> $data)>

Constructs an AttachedPicture frame based on $data.

=item I<DESTROY()>

Destroys the AttahcedPictureFrame instance.

=item I<L<String|Audio::TagLib::String> toString()>

Returns a string containing the description and mime-type

=item I<PV textEncoding()>

Returns the text encoding used for the description.

see I<setTextEncoding()>

see I<description()>

=item I<void setTextEncoding(PV $t)>

Set the text encoding used for the description.

see I<description()>

=item I<L<String|Audio::TagLib::String> mimeType()>

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

=item I<void setMimeType(L<String|Audio::TagLib::String> $m)>

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

=item I<PV type()>

Returns the type of the image.

see I<setType()>

see %_Type

=item I<void setType(PV $t)>

Sets the type for the image.

see I<type()>

see %_Type

=item I<L<String|Audio::TagLib::String> description()>

Returns a text description of the image.

see I<setDescription()>

see I<textEncoding()>

see I<setTextEncoding()>

=item I<void setDescription(L<String|Audio::TagLib::String> $desc)>

Sets a textual description of the image to $desc.

see I<description()>

see I<textEncoding()>

see I<setTextEncoding()>

=item I<L<ByteVector|Audio::TagLib::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 I<setPicture()>

see I<mimeType()>

=item I<void setPicture(L<ByteVector|Audio::TagLib::ByteVector> $p)>

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

see I<picture()>

see I<mimeType()>

see I<setMimeType()>

=item %_Type



( run in 2.140 seconds using v1.01-cache-2.11-cpan-788537b7465 )