# BitmapExtractor

public final class **BitmapExtractor** Utility for extracting `Bitmap` from `MlImage`.

Currently it only supports `MlImage` with `MlImage.STORAGE_TYPE_BITMAP`, otherwise
`IllegalArgumentException` will be thrown.

<br />

### Public Methods

|---|---|
| static Bitmap | [extract](https://developers.google.com/edge/api/tflite/java/com/google/android/odml/image/BitmapExtractor.md.txt#extract(com.google.android.odml.image.MlImage))([MlImage](https://developers.google.com/edge/api/tflite/java/com/google/android/odml/image/MlImage.md.txt) image) Extracts a `Bitmap` from an `MlImage`. |

### Inherited Methods

From class java.lang.Object

|---|---|
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Public Methods

#### public static Bitmap
**extract**
([MlImage](https://developers.google.com/edge/api/tflite/java/com/google/android/odml/image/MlImage.md.txt) image)

Extracts a `Bitmap` from an `MlImage`.

Notice: Properties of the `image` like rotation will not take effects.

<br />

##### Parameters

| image | the image to extract `Bitmap` from. |
|---|---|

##### Returns

- the `Bitmap` stored in `MlImage`

##### Throws

| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | when the extraction requires unsupported format or data type conversions. |
|---|---|