node-taglib-sharp / Exports / XiphPicture
Interface that provides generic information about a picture, including its contents, as used by various formats.
• get colorDepth(): number
Gets the color depth of the picture in the current instance.
number
• set colorDepth(value): void
Sets the color depth of the picture in the current instance.
| Name | Type | Description |
|---|---|---|
value |
number |
Color depth of the picture. Must be a positive 32-bit integer |
void
• get data(): ByteVector
Gets and sets the picture data stored in the current instance.
• set data(value): void
Gets and sets the picture data stored in the current instance.
| Name | Type |
|---|---|
value |
ByteVector |
void
• get description(): string
Gets and sets a description of the picture stored in the current instance. Optional.
string
• set description(value): void
Gets and sets a description of the picture stored in the current instance. Optional.
| Name | Type |
|---|---|
value |
string |
void
• get filename(): string
Gets and sets a filename of the picture stored in the current instance. Optional.
Remarks
This value is not stored in a XIPH picture and is only available if copied from another picture.
string
• set filename(value): void
Gets and sets a filename of the picture stored in the current instance. Optional.
Remarks
This value is not stored in a XIPH picture so setting it has no impact.
| Name | Type |
|---|---|
value |
string |
void
• get height(): number
Gets the height of the picture in the current instance in pixels.
number
• set height(value): void
Sets the height of the picture in the current instance.
| Name | Type | Description |
|---|---|---|
value |
number |
height of the picture in pixels, must be a positive 32-bit integer. |
void
• get indexedColors(): number
Gets the number of indexed colors in the picture represented by the current instance.
number
• set indexedColors(value): void
Sets the number of indexed colors in the picture represented by the current instance.
| Name | Type | Description |
|---|---|---|
value |
number |
Number of indexed colors in the pictures or 0 if the picture is not stored in an indexed format. Must be a positive 32-bit integer |
void
• get isLoaded(): boolean
Gets whether the object has been loaded.
boolean
• get mimeType(): string
Gets and sets the mime-type of the picture data stored in the current instance.
string
• set mimeType(value): void
Gets and sets the mime-type of the picture data stored in the current instance.
| Name | Type |
|---|---|
value |
string |
void
• get type(): PictureType
Gets and sets the type of the content visible in the picture stored in the current instance.
• set type(value): void
Gets and sets the type of the content visible in the picture stored in the current instance.
| Name | Type |
|---|---|
value |
PictureType |
void
• get width(): number
Gets the width of the picture in the current instance in pixels.
number
• set width(value): void
Sets the width of the picture in the current instance.
| Name | Type | Description |
|---|---|---|
value |
number |
Width of the picture in pixels, must be positive 32-bit integer. |
void
▸ load(): void
Loads the object.
void
▸ renderForFlacBlock(): ByteVector
Renders the picture for use in a FLAC block.
▸ renderForXiphComment(): string
Renders the picture for use in a XIPH comment block (ie, the same structure as a FLAC block, but base64 encoded).
string
▸ Static fromFlacBlock(block, isLazy?): XiphPicture
Constructs and initializes a new instance by reading the contents of the picture from a FLAC block. Intended to be used by the FlacTag class.
| Name | Type | Default value | Description |
|---|---|---|---|
block |
FlacBlock |
undefined |
FLAC block containing the Xiph image. |
isLazy |
boolean |
false |
Whether or not to lazily load the data. For FLAC blocks, this will chain into the lazy loading capabilities of the block |
▸ Static fromPicture(picture): XiphPicture
Constructs and initializes a new instance by copying the properties of an IPicture object.
| Name | Type | Description |
|---|---|---|
picture |
IPicture |
Object to copy properties from. |
▸ Static fromXiphComment(data, isLazy?): XiphPicture
Constructs and initializes a new instance by decoding and reading the contents of a raw Xiph image structure. Intended to be used by the XiphComment class.
| Name | Type | Default value | Description |
|---|---|---|---|
data |
string |
undefined |
Object containing the raw, base64 encoded Xiph image |
isLazy |
boolean |
false |
Whether or not to lazily load the data. For xiph comments, this only delays decoding the data from base64 |