目录

HmsScanFrame

Class Info

public class HmsScanFrame

Class encapsulating the scanned image information, which includes the image format.

Public Constructor Summary

Constructor name

HmsScanFrame(Bitmap bitmap)

HmsScanFrame constructor that supports images encoded in bitmap.

HmsScanFrame(YuvImage yuvImage)

HmsScanFrame constructor that supports images encoded in YUV. Currently, only the NV21 format is supported.

Public Method Summary

Qualifier and Type

Method Name and Description

Bitmap

getBitmap()

Obtains a bitmap image after calling HmsScanFrame(Bitmap bitmap).

int

getHeight()

Obtains the image height.

int

getWidth()

Obtains the image width.

YuvImage

getYuvImage()

Obtains a YuvImage object after calling HmsScanFrame(YuvImage yuvImage).

Public Constructors

[h2]HmsScanFrame(Bitmap bitmap)

Constructor

public HmsScanFrame(Bitmap bitmap)

HmsScanFrame constructor that supports images encoded in bitmap.

Parameters

Name

Description

bitmap

Data of the bitmap image.

[h2]HmsScanFrame(YuvImage yuvImage)

Constructor

public HmsScanFrame(YuvImage yuvImage)

HmsScanFrame constructor that supports images encoded in YUV. Currently, only the NV21 format is supported.

Parameters

Name

Description

yuvImage

Data of the YUV image.

Public Methods

[h2]getBitmap

Method

public Bitmap getBitmap()

Obtains the bitmap image information.

Returns

Type

Description

Bitmap

Bitmap image information.

[h2]getHeight

Method

public int getHeight()

Obtains the image height.

Returns

Type

Description

int

Image height.

[h2]getWidth

Method

public int getWidth()

Obtains the image width.

Returns

Type

Description

int

Image width.

[h2]getYuvImage

Method

public YuvImage getYuvImage()

Obtains a YuvImage object.

Returns

Type

Description

YuvImage

YuvImage object.