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)

375
376
# File 'docs/taglib/mp4.rb', line 375

def initialize(format, data)
end

Instance Attribute Details

#dataString (readonly)

Returns the raw image data

Returns:

  • (String)

370
371
372
# File 'docs/taglib/mp4.rb', line 370

def data
  @data
end

#formatFixnum (readonly)

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

Returns:

  • (Fixnum)

366
367
368
# File 'docs/taglib/mp4.rb', line 366

def format
  @format
end