public class Image
extends java.lang.Object
implements android.os.Parcelable
| Modifier and Type | Field and Description | 
|---|---|
static android.os.Parcelable.Creator | 
CREATOR  | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
Image(android.os.Parcel in)  | 
| Modifier and Type | Method and Description | 
|---|---|
Image | 
clone()
Creates and returns a copy of this image object. 
 | 
android.graphics.Bitmap | 
convertToBitmap()
Converts this image into Android Bitmap. 
 | 
int | 
describeContents()  | 
void | 
dispose()
Disposes native object containing image pixels. 
 | 
protected void | 
finalize()  | 
java.nio.ByteBuffer | 
getBuffer()
Returns the native buffer that contains image pixels. 
 | 
int | 
getHeight()
Returns the height of the image (corrected for the current orientation). 
 | 
ImageFormat | 
getImageFormat()
Returns the format of the image. 
 | 
java.lang.String | 
getImageName()
Deprecated. 
 
Do not rely on this information anymore. New API images will be nameless. 
 | 
Orientation | 
getImageOrientation()
Returns the orientation of the image. 
 | 
ImageType | 
getImageType()
Returns the type of the image. 
 | 
int | 
getPixelStride()
Returns the pixel stride for image buffer. 
 | 
int | 
getRawHeight()
Returns the raw height of the image (uncorrected for the orientation) 
 | 
android.graphics.Rect | 
getRawROI()
Returns the region of interest in image in raw form (not corrected for orientation). 
 | 
int | 
getRawWidth()
Returns the raw width of the image (uncorrected for the orientation) 
 | 
android.graphics.Rect | 
getROI()
Returns the region of interest in image corrected for current orientation of image. 
 | 
int | 
getRowStride()
Returns the row stride for image buffer. 
 | 
int | 
getWidth()
Returns the width of the image (corrected for the current orientation). 
 | 
boolean | 
isDisposed()
Returns true if image's internal buffers are disposed and cannot be used anymore. 
 | 
void | 
setImageOrientation(Orientation orientation)
Use this method to change Image's orientation. 
 | 
void | 
setROI(android.graphics.Rect roi)
Sets the region of interest in image. 
 | 
void | 
writeToParcel(android.os.Parcel dest,
             int flags)  | 
public void dispose()
protected void finalize()
                 throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable@NonNull public Image clone()
clone in class java.lang.Objectpublic int getWidth()
public int getRawWidth()
public int getHeight()
public int getRawHeight()
@NonNull public ImageType getImageType()
@NonNull public ImageFormat getImageFormat()
@NonNull @Deprecated public java.lang.String getImageName()
@NonNull public java.nio.ByteBuffer getBuffer()
public int getPixelStride()
public int getRowStride()
@NonNull public android.graphics.Rect getROI()
@NonNull public android.graphics.Rect getRawROI()
YuvImage )public void setROI(@NonNull
                   android.graphics.Rect roi)
Image.getImageOrientation().roi - region of interest in image@NonNull public Orientation getImageOrientation()
public void setImageOrientation(@NonNull
                                Orientation orientation)
orientation - public boolean isDisposed()
@Nullable public android.graphics.Bitmap convertToBitmap()
public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(@NonNull
                          android.os.Parcel dest,
                          int flags)
writeToParcel in interface android.os.Parcelable