# PictureFrame

Artifact: [androidx.media3:media3-extractor](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/extractor/metadata/flac/PictureFrame.java+class:androidx.media3.extractor.metadata.flac.PictureFrame)

*** ** * ** ***

<br />

```
@UnstableApi
class PictureFrame : Metadata.Entry
```

<br />

*** ** * ** ***

A picture parsed from a Vorbis Comment or a FLAC picture block.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#PictureFrame(int,java.lang.String,java.lang.String,int,int,int,int,byte[])( pictureType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, mimeType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, depth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, colors: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, pictureData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>! )` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#equals(java.lang.Object)(obj: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#fromPictureBlock(androidx.media3.common.util.ParsableByteArray)(pictureBlock: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!)` Parses a `METADATA_BLOCK_PICTURE` into a `PictureFrame` instance. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#populateMediaMetadata(androidx.media3.common.MediaMetadata.Builder)(builder: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata.Builder!)` Updates the `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata.Builder` with the type-specific values stored in this ` Entry`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#colors()` For indexed-color pictures (e.g. GIF), the number of colors used. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#depth()` The color depth of the picture in bits-per-pixel. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#description()` A description of the picture. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#height()` The height of the picture in pixels. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#mimeType()` The MIME type of the picture. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#pictureData()` The encoded picture data. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#pictureType()` The type of the picture. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame#width()` The width of the picture in pixels. |

### Inherited functions

From [androidx.media3.common.Metadata.Entry](https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>?` `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()()`

Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.
`https://developer.android.com/reference/kotlin/androidx/media3/common/Format?` `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#getWrappedMetadataFormat()()`

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` that can be used to decode the wrapped metadata in `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()`, or null if this Entry doesn't contain wrapped metadata.

## Public constructors

### PictureFrame

```
PictureFrame(
    pictureType: Int,
    mimeType: String!,
    description: String!,
    width: Int,
    height: Int,
    depth: Int,
    colors: Int,
    pictureData: ByteArray<Byte>!
)
```

## Public functions

### equals

```
fun equals(obj: Any?): Boolean
```

### fromPictureBlock

```
java-static fun fromPictureBlock(pictureBlock: ParsableByteArray!): PictureFrame!
```

Parses a `METADATA_BLOCK_PICTURE` into a `PictureFrame` instance.

`pictureBlock` may be read directly from a [FLAC file](https://www.rfc-editor.org/rfc/rfc9639.html#name-picture), or decoded from the base64 content of a [Vorbis Comment](https://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE).

| Parameters |
|---|---|
| `pictureBlock: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!` | The data of the `METADATA_BLOCK_PICTURE`, not including any headers. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/flac/PictureFrame!` | A `PictureFrame` parsed from `pictureBlock`. |

### hashCode

```
fun hashCode(): Int
```

### populateMediaMetadata

```
fun populateMediaMetadata(builder: MediaMetadata.Builder!): Unit
```

Updates the `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata.Builder` with the type-specific values stored in this ` Entry`.

| Parameters |
|---|---|
| `builder: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata.Builder!` | The builder to be updated. |

### toString

```
fun toString(): String!
```

## Public properties

### colors

```
val colors: Int
```

For indexed-color pictures (e.g. GIF), the number of colors used. 0 otherwise.

### depth

```
val depth: Int
```

The color depth of the picture in bits-per-pixel.

### description

```
val description: String!
```

A description of the picture.

### height

```
val height: Int
```

The height of the picture in pixels.

### mimeType

```
val mimeType: String!
```

The MIME type of the picture.

### pictureData

```
val pictureData: Array<Byte>!
```

The encoded picture data.

### pictureType

```
val pictureType: Int
```

The type of the picture.

### width

```
val width: Int
```

The width of the picture in pixels.