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

JPEG =
0x0D
PNG =
0x0E

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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


264
265
# File 'docs/taglib/mp4.rb', line 264

def initialize(format, data)
end

Instance Attribute Details

#dataString (readonly)

Returns the raw image data


259
260
261
# File 'docs/taglib/mp4.rb', line 259

def data
  @data
end

#formatFixnum (readonly)

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


255
256
257
# File 'docs/taglib/mp4.rb', line 255

def format
  @format
end