Class: TagLib::MP4::CoverArt

Inherits:
Object
  • Object
show all
Defined in:
docs/taglib/mp4.rb

Overview

The CoverArt class is used to embed cover art images in MP4 tags.

Examples:

Creating a new CoverArt instance

image_data = File.open('cover_art.jpeg', 'rb') { |f| f.read }
cover_art = TagLib::MP4::CoverArt.new(TagLib::MP4::CoverArt::JPEG, image_data)

Constant Summary collapse

Unknown =
0x00
JPEG =
0x0D
PNG =
0x0E
BMP =
0x1B
GIF =

Deprecated

0x0C

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(format, data) ⇒ TagLib::MP4::CoverArt

Parameters:

  • format (Fixnum)
  • data (String)


373
374
# File 'docs/taglib/mp4.rb', line 373

def initialize(format, data)
end

Instance Attribute Details

#dataString (readonly)

Returns the raw image data

Returns:

  • (String)


368
369
370
# File 'docs/taglib/mp4.rb', line 368

def data
  @data
end

#formatFixnum (readonly)

Returns the format of the image data: JPEG or PNG.

Returns:

  • (Fixnum)


364
365
366
# File 'docs/taglib/mp4.rb', line 364

def format
  @format
end