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


Audio-TagLib documentation Contained in the Audio-TagLib distribution.

Index


Code Index:

NAME

Top

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

SYNOPSIS

Top

  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"));

DESCRIPTION

Top

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 %Audio::TagLib::ID3v2::AttachedPictureFrame::_Type lists all available values used in Perl code.

EXPORT

None by default.

SEE ALSO

Top

Audio::TagLib Frame

AUTHOR

Top

Dongxu Ma, <dongxu@cpan.org>

COPYRIGHT AND LICENSE

Top


Audio-TagLib documentation Contained in the Audio-TagLib distribution.

package Audio::TagLib::ID3v2::AttachedPictureFrame;

use 5.008003;
use strict;
use warnings;

our $VERSION = '1.41';

use Audio::TagLib;

our @ISA = qw(Audio::TagLib::ID3v2::Frame);

our %_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",
    "DuringPeformance"   => "0x0F",
    "MovieScreenCapture" => "0x10",
    "ColouredFish"       => "0x11",
    "Illustration"       => "0x12",
    "BandLogo"           => "0x13",
    "PublisherLogo"      => "0x14",
);

# Preloaded methods go here.

1;
__END__
# Below is stub documentation for your module. You'd better edit it!