# ExperimentalGetImage

Artifact: [androidx.camera:camera-core](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/core/ExperimentalGetImage.java+class:androidx.camera.core.ExperimentalGetImage) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/camera#1.0.0)

*** ** * ** ***


```
@Retention(value = RetentionPolicy.CLASS)
@RequiresOptIn
annotation ExperimentalGetImage
```

<br />

*** ** * ** ***

Denotes that the annotated method uses the experimental `https://developer.android.com/reference/kotlin/androidx/camera/core/ImageProxy#getImage()` method.

The getImage() method makes the assumptions that each `https://developer.android.com/reference/kotlin/androidx/camera/core/ImageProxy` is the sole owner of the underlying `https://developer.android.com/reference/android/media/Image.html` which might not be the case. In the case where the Image is shared by multiple ImageProxy, if the Image is closed then it will invalidate multiple ImageProxy without a way to clearly indicate this has occurred.

When using this method it would be recommended to not close the Image via `https://developer.android.com/reference/android/media/Image.html#close()`. Instead when the Image needs to be closed, `https://developer.android.com/reference/kotlin/androidx/camera/core/ImageProxy#close()` should be called on the ImageProxy from which the Image was retrieved.