MediaImageExtractor

@RequiresApi(value = VERSION_CODES.KITKAT)
public class MediaImageExtractor


Utility for extracting android.media.Image from MPImage.

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

Summary

Public methods

static Image

Extracts a android.media.Image from a MPImage.

Public methods

extract

public static Image extract(MPImage image)

Extracts a android.media.Image from a MPImage. Currently it only works for MPImage that built from MediaImageBuilder.

Parameters
MPImage image

the image to extract android.media.Image from.

Returns
Image

android.media.Image that stored in MPImage.

Throws
java.lang.IllegalArgumentException

if the extraction failed.