Class: TagLib::FLAC::Picture

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

Overview

FLAC picture, e.g. for attaching a cover image to a file.

The constants in this class are used for the #type attribute.

Since:

  • 0.5.0

Constant Summary collapse

Other =

Other

Since:

  • 0.5.0

0x00
FileIcon =

32x32 file icon (PNG only)

Since:

  • 0.5.0

0x01
OtherFileIcon =

Since:

  • 0.5.0

0x02
FrontCover =

Since:

  • 0.5.0

0x03
BackCover =

Since:

  • 0.5.0

0x04
LeafletPage =

Since:

  • 0.5.0

0x05
Media =

Since:

  • 0.5.0

0x06
LeadArtist =

Since:

  • 0.5.0

0x07
Artist =

Since:

  • 0.5.0

0x08
Conductor =

Since:

  • 0.5.0

0x09
Band =

Since:

  • 0.5.0

0x0A
Composer =

Since:

  • 0.5.0

0x0B
Lyricist =

Since:

  • 0.5.0

0x0C
RecordingLocation =

Since:

  • 0.5.0

0x0D
DuringRecording =

Since:

  • 0.5.0

0x0E
DuringPerformance =

Since:

  • 0.5.0

0x0F
MovieScreenCapture =

Since:

  • 0.5.0

0x10
ColouredFish =

Since:

  • 0.5.0

0x11
Illustration =

Since:

  • 0.5.0

0x12
BandLogo =

Since:

  • 0.5.0

0x13
PublisherLogo =

Since:

  • 0.5.0

0x14

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePicture

Returns a new instance of Picture.

Since:

  • 0.5.0


186
187
# File 'docs/taglib/flac.rb', line 186

def initialize()
end

Instance Attribute Details

#color_depthInteger

Color depth (in bits-per-pixel)

Returns:

  • (Integer)

Since:

  • 0.5.0


210
211
212
# File 'docs/taglib/flac.rb', line 210

def color_depth
  @color_depth
end

#databinary String

Picture data

Be sure to use a binary string when setting this attribute. In Ruby 1.9, this means reading from a file with "b" mode to get a string with encoding BINARY / ASCII-8BIT.

Returns:

  • (binary String)

Since:

  • 0.5.0


223
224
225
# File 'docs/taglib/flac.rb', line 223

def data
  @data
end

#descriptionString

Returns:

  • (String)

Since:

  • 0.5.0


198
199
200
# File 'docs/taglib/flac.rb', line 198

def description
  @description
end

#heightInteger

Picture height in pixels

Returns:

  • (Integer)

Since:

  • 0.5.0


206
207
208
# File 'docs/taglib/flac.rb', line 206

def height
  @height
end

#mime_typeString

MIME type (e.g. "image/png")

Returns:

  • (String)

Since:

  • 0.5.0


195
196
197
# File 'docs/taglib/flac.rb', line 195

def mime_type
  @mime_type
end

#num_colorsInteger

Number of colors (for indexed images)

Returns:

  • (Integer)

Since:

  • 0.5.0


214
215
216
# File 'docs/taglib/flac.rb', line 214

def num_colors
  @num_colors
end

#typePicture constant

Type of the picture, see constants.

Returns:

Since:

  • 0.5.0


191
192
193
# File 'docs/taglib/flac.rb', line 191

def type
  @type
end

#widthInteger

Picture width in pixels

Returns:

  • (Integer)

Since:

  • 0.5.0


202
203
204
# File 'docs/taglib/flac.rb', line 202

def width
  @width
end

Instance Method Details

#parse(rawdata) ⇒ Boolean

Parse the picture data in the FLAC picture block format.

Returns:

  • (Boolean)

    True if the data has been parsed successfully, false otherwise.

Since:

  • 1.0.0


229
230
# File 'docs/taglib/flac.rb', line 229

def parse(rawdata)
end