# MediaImageExtractor

public class **MediaImageExtractor** Utility for extracting `Image` from `MlImage`.

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

<br />

### Public Methods

|---|---|
| static Image | [extract](https://developers.google.com/edge/api/tflite/java/com/google/android/odml/image/MediaImageExtractor.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 `Image` 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 Image
**extract**
([MlImage](https://developers.google.com/edge/api/tflite/java/com/google/android/odml/image/MlImage.md.txt) image)

Extracts a `Image` from an `MlImage`. Currently it only works for
`MlImage` that built from `MediaMlImageBuilder`.

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

<br />

##### Parameters

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

##### Returns

- `Image` that stored in `MlImage`.

##### Throws

| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | if the extraction failed. |
|---|---|