BASS.NET API for the Un4seen BASS Audio Library

BASS_TAG_FLAC_PICTURE Class

BASS.NET API for the Un4seen BASS Audio Library
FLAC picture tag structure as returned by BASS_ChannelGetTags(Int32, BASSTag) using the BASS_TAG_FLAC_PICTURE flag.
Inheritance Hierarchy

SystemObject
  Un4seen.BassBASS_TAG_FLAC_PICTURE

Namespace:  Un4seen.Bass
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

[SerializableAttribute]
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public class BASS_TAG_FLAC_PICTURE

The BASS_TAG_FLAC_PICTURE type exposes the following members.

Properties

  NameDescription
Public propertyColors
The number of colours used for indexed-colour pictures (eg. GIF).
Public propertyData
The picture data.
Public propertyDepth
The colour depth in bits-per-pixel.
Public propertyDesc
A description string of the picture.
Public propertyHeight
The height in pixels.
Public propertyImageURL
Returns the image URL, if the Mime type is "-->" - else is returned.
Public propertyLength
The size of Data in bytes.
Public propertyMime
The MIME type string. This may be "-->" to signify that data contains a URL of the picture rather than the picture data itself.
Public propertyPicture
The picture image.
Public propertyWidth
The width in pixels.
Top
Methods

  NameDescription
Public methodStatic memberFromIntPtr
Creates an instance of the BASS_TAG_FLAC_PICTURE class from a pointer.
Public methodStatic memberCode exampleGetTag
Gets a BASS_TAG_FLAC_PICTURE tag from a given channel handle.
Public methodToString
Returns the description and mime type of the picture.
(Overrides ObjectToString.)
Top
Remarks

The width, height, depth, and colors members may be empty (0) so should not be depended on. That information can be obtained from the picture data itself.

Use the static GetTag(Int32, Int32) method to get the FLAC picture tag from a given channel handle.

When calling BASS_ChannelGetTags(Int32, BASSTag) with the BASS_TAG_FLAC_PICTURE flag make sure to add the index number of the picture to get. E.g. call:

Bass.BASS_ChannelGetTags( stream, (BASSTag)(BASSTag.BASS_TAG_FLAC_PICTURE + 1) )
to get the 2nd picture.

Examples

Read all FLAC picture tags:
BASS_TAG_FLAC_PICTURE flacPic;
for (int n = 0; (flacPic = BASS_TAG_FLAC_PICTURE.GetTag(stream, n)) != null; n++)
{
    Console.WriteLine(flacPic);
    // access the image picture
    Image img = flacPic.Picture;
    // access the raw image data
    byte[] data = flacPic.Data;
}
See Also

Reference