Class: TagLib::FLAC::Picture
- Inherits:
-
Object
- Object
- TagLib::FLAC::Picture
- 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.
Constant Summary collapse
- Other =
Other
0x00
- FileIcon =
32x32 file icon (PNG only)
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
- DuringPerformance =
0x0F
- MovieScreenCapture =
0x10
- ColouredFish =
0x11
- Illustration =
0x12
- BandLogo =
0x13
- PublisherLogo =
0x14
Instance Attribute Summary collapse
-
#color_depth ⇒ Integer
Color depth (in bits-per-pixel).
-
#data ⇒ binary String
Picture data.
-
#description ⇒ String
-
#height ⇒ Integer
Picture height in pixels.
-
#mime_type ⇒ String
MIME type (e.g.
"image/png"
). -
#num_colors ⇒ Integer
Number of colors (for indexed images).
-
#type ⇒ Picture constant
Type of the picture, see constants.
-
#width ⇒ Integer
Picture width in pixels.
Instance Method Summary collapse
-
#initialize ⇒ Picture
constructor
A new instance of Picture.
-
#parse(rawdata) ⇒ Boolean
Parse the picture data in the FLAC picture block format.
Constructor Details
#initialize ⇒ Picture
Returns a new instance of Picture.
184 185 |
# File 'docs/taglib/flac.rb', line 184 def initialize end |
Instance Attribute Details
#color_depth ⇒ Integer
Color depth (in bits-per-pixel)
208 209 210 |
# File 'docs/taglib/flac.rb', line 208 def color_depth @color_depth end |
#data ⇒ binary 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
.
221 222 223 |
# File 'docs/taglib/flac.rb', line 221 def data @data end |
#description ⇒ String
196 197 198 |
# File 'docs/taglib/flac.rb', line 196 def description @description end |
#height ⇒ Integer
Picture height in pixels
204 205 206 |
# File 'docs/taglib/flac.rb', line 204 def height @height end |
#mime_type ⇒ String
MIME type (e.g. "image/png"
)
193 194 195 |
# File 'docs/taglib/flac.rb', line 193 def mime_type @mime_type end |
#num_colors ⇒ Integer
Number of colors (for indexed images)
212 213 214 |
# File 'docs/taglib/flac.rb', line 212 def num_colors @num_colors end |
#type ⇒ Picture constant
Type of the picture, see constants.
189 190 191 |
# File 'docs/taglib/flac.rb', line 189 def type @type end |
#width ⇒ Integer
Picture width in pixels
200 201 202 |
# File 'docs/taglib/flac.rb', line 200 def width @width end |
Instance Method Details
#parse(rawdata) ⇒ Boolean
Parse the picture data in the FLAC picture block format.
227 228 |
# File 'docs/taglib/flac.rb', line 227 def parse(rawdata) end |