تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# MediaImageExtractor\n\npublic class **MediaImageExtractor** \nUtility for extracting [Image](https://developer.android.com/reference/android/media/Image.html) from [MlImage](/edge/api/tflite/java/com/google/android/odml/image/MlImage).\n\nCurrently it only supports [MlImage](/edge/api/tflite/java/com/google/android/odml/image/MlImage) with [MlImage.STORAGE_TYPE_MEDIA_IMAGE](/edge/api/tflite/java/com/google/android/odml/image/MlImage#STORAGE_TYPE_MEDIA_IMAGE),\notherwise [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) will be thrown.\n\n\u003cbr /\u003e\n\n### Public Methods\n\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static Image | [extract](/edge/api/tflite/java/com/google/android/odml/image/MediaImageExtractor#extract(com.google.android.odml.image.MlImage))([MlImage](/edge/api/tflite/java/com/google/android/odml/image/MlImage) image) Extracts a [Image](https://developer.android.com/reference/android/media/Image.html) from an [MlImage](/edge/api/tflite/java/com/google/android/odml/image/MlImage). |\n\n### Inherited Methods\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |\n| final [Class](https://developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public static Image\n**extract**\n([MlImage](/edge/api/tflite/java/com/google/android/odml/image/MlImage) image)\n\nExtracts a [Image](https://developer.android.com/reference/android/media/Image.html) from an [MlImage](/edge/api/tflite/java/com/google/android/odml/image/MlImage). Currently it only works for\n[MlImage](/edge/api/tflite/java/com/google/android/odml/image/MlImage) that built from [MediaMlImageBuilder](/edge/api/tflite/java/com/google/android/odml/image/MediaMlImageBuilder).\n\nNotice: Properties of the `image` like rotation will not take effects.\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| image | the image to extract [Image](https://developer.android.com/reference/android/media/Image.html) from. |\n|-------|------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- [Image](https://developer.android.com/reference/android/media/Image.html) that stored in [MlImage](/edge/api/tflite/java/com/google/android/odml/image/MlImage). \n\n##### Throws\n\n| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | if the extraction failed. |\n|-------------------------------------------------------------------------------------------------------------|---------------------------|"]]