BitmapExtractor

  • BitmapExtractor is a utility for extracting a Bitmap from an MlImage.

  • It currently only supports MlImage with MlImage.STORAGE_TYPE_BITMAP.

  • The extract method extracts a Bitmap from an MlImage.

  • Properties of the image like rotation will not take effects when extracting.

public final class BitmapExtractor extends Object

Utility for extracting Bitmap from MlImage .

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

Public Method Summary

static Bitmap
extract (MlImage image)
Extracts a Bitmap from an MlImage .

Inherited Method Summary

From class java.lang.Object
Object
clone()
boolean
equals(Object arg0)
void
finalize()
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

Public Methods

public static Bitmap extract (MlImage image)

Extracts a Bitmap from an MlImage .

Notice: Properties of the image like rotation will not take effects.

Parameters
image the image to extract Bitmap from.
Returns
Throws
IllegalArgumentException when the extraction requires unsupported format or data type conversions.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年10月31日 UTC.