# ImageDecoder.ImageInfo

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# ImageInfo

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/graphics/ImageDecoder.ImageInfo "View this page in Java")  

```
class ImageInfo
```

|---|------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                     ||
| ↳ | [android.graphics.ImageDecoder.ImageInfo](https://developer.android.com/reference/kotlin/android/graphics/ImageDecoder.ImageInfo#) |

Information about an encoded image.

## Summary

|                                                                                                                                   Public methods                                                                                                                                   ||
|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[ColorSpace](https://developer.android.com/reference/kotlin/android/graphics/ColorSpace)? | [getColorSpace](https://developer.android.com/reference/kotlin/android/graphics/ImageDecoder.ImageInfo#getColorSpace())`()` If known, the color space the decoded bitmap will have. |
| open[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)          | [getMimeType](https://developer.android.com/reference/kotlin/android/graphics/ImageDecoder.ImageInfo#getMimeType())`()` The mimeType of the image.                                  |
| open[Size](https://developer.android.com/reference/kotlin/android/util/Size.html#)            | [getSize](https://developer.android.com/reference/kotlin/android/graphics/ImageDecoder.ImageInfo#getSize())`()` Size of the image, without scaling or cropping.                     |
| open[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)        | [isAnimated](https://developer.android.com/reference/kotlin/android/graphics/ImageDecoder.ImageInfo#isAnimated())`()` Whether the image is animated.                                |

## Public methods

### getColorSpace

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getColorSpace(): ColorSpace?
```

If known, the color space the decoded bitmap will have. Note that the output color space is not guaranteed to be the color space the bitmap is encoded with. If not known (when the config is[Bitmap.Config.ALPHA_8](https://developer.android.com/reference/kotlin/android/graphics/Bitmap.Config)for instance), or there is an error, it is set to null.  

### getMimeType

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getMimeType(): String
```

The mimeType of the image.

|                                                    Return                                                     ||
|----------------------------------------------------------------------------------|-----------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | This value cannot be`null`. |

### getSize

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getSize(): Size
```

Size of the image, without scaling or cropping.

|                                                   Return                                                    ||
|--------------------------------------------------------------------------------|-----------------------------|
| [Size](https://developer.android.com/reference/kotlin/android/util/Size.html#) | This value cannot be`null`. |

### isAnimated

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun isAnimated(): Boolean
```

Whether the image is animated.

If`true`, #decodeDrawable will return an[AnimatedImageDrawable](https://developer.android.com/reference/kotlin/android/graphics/drawable/AnimatedImageDrawable).