BitmapExtractor

public final class BitmapExtractor


Utility for extracting android.graphics.Bitmap from MPImage.

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

Summary

Public methods

static Bitmap

Extracts a android.graphics.Bitmap from a MPImage.

Public methods

extract

public static Bitmap extract(MPImage image)

Extracts a android.graphics.Bitmap from a MPImage.

Parameters
MPImage image

the image to extract android.graphics.Bitmap from.

Returns
Bitmap

the android.graphics.Bitmap stored in MPImage

Throws
java.lang.IllegalArgumentException

when the extraction requires unsupported format or data type conversions.