ExperimentalGetImage

@RequiresApi(value = 21)
@Retention(value = CLASS)
@RequiresOptIn
public annotation ExperimentalGetImage


Denotes that the annotated method uses the experimental getImage method.

The getImage() method makes the assumptions that each ImageProxy is the sole owner of the underlying android.media.Image 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 close. Instead when the Image needs to be closed, close should be called on the ImageProxy from which the Image was retrieved.