public final class BarcodeUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
BarcodeUtils.Rotation |
| Modifier and Type | Field and Description |
|---|---|
static int |
ROTATION_0 |
static int |
ROTATION_180 |
static int |
ROTATION_270 |
static int |
ROTATION_90 |
| Modifier and Type | Method and Description |
|---|---|
static android.graphics.Bitmap |
createBitmap(BitMatrix matrix)
Create bitmap from bit matrix
|
static Result |
decodeBitmap(android.graphics.Bitmap bitmap)
Decode barcode from bitmap
|
static Result |
decodeBitmap(android.graphics.Bitmap bitmap,
java.util.Map<DecodeHintType,?> hints)
Decode barcode from bitmap
|
static Result |
decodeRgb(int[] pixels,
int width,
int height)
Decode barcode from RGB pixels array
|
static Result |
decodeRgb(int[] pixels,
int width,
int height,
java.util.Map<DecodeHintType,?> hints)
Decode barcode from RGB pixels array
|
static Result |
decodeYuv(byte[] pixels,
int width,
int height)
Decode barcode from YUV pixels array
|
static Result |
decodeYuv(byte[] pixels,
int width,
int height,
int rotation,
boolean reverseHorizontal,
java.util.Map<DecodeHintType,?> hints)
Decode barcode from YUV pixels array
|
static android.graphics.Bitmap |
encodeBitmap(java.lang.String content,
BarcodeFormat format,
int width,
int height)
Encode text content
|
static android.graphics.Bitmap |
encodeBitmap(java.lang.String content,
BarcodeFormat format,
int width,
int height,
java.util.Map<EncodeHintType,?> hints)
Encode text content
|
static BitMatrix |
encodeBitMatrix(java.lang.String content,
BarcodeFormat format,
int width,
int height)
Encode text content
|
static BitMatrix |
encodeBitMatrix(java.lang.String content,
BarcodeFormat format,
int width,
int height,
java.util.Map<EncodeHintType,?> hints)
Encode text content
|
public static final int ROTATION_0
public static final int ROTATION_90
public static final int ROTATION_180
public static final int ROTATION_270
public static Result decodeBitmap(android.graphics.Bitmap bitmap)
bitmap - Bitmapnull otherwisepublic static Result decodeBitmap(android.graphics.Bitmap bitmap,
java.util.Map<DecodeHintType,?> hints)
bitmap - Bitmaphints - Decoder hintsnull otherwiseDecodeHintTypepublic static Result decodeRgb(int[] pixels,
int width,
int height)
pixels - Colors in standard Android ARGB formatwidth - Image widthheight - Image heightnull otherwiseColorpublic static Result decodeRgb(int[] pixels,
int width,
int height,
java.util.Map<DecodeHintType,?> hints)
pixels - Colors in standard Android ARGB formatwidth - Image widthheight - Image heighthints - Decoder hintsnull otherwiseDecodeHintType,
Colorpublic static Result decodeYuv(byte[] pixels,
int width,
int height)
pixels - YUV image datawidth - Image widthheight - Image heightnull otherwisepublic static Result decodeYuv(byte[] pixels,
int width,
int height,
int rotation,
boolean reverseHorizontal,
java.util.Map<DecodeHintType,?> hints)
pixels - YUV image datawidth - Image widthheight - Image heightrotation - Degrees to rotate image before decoding (only 0, 90, 180 or 270 are allowed)reverseHorizontal - Reverse image horizontally before decodinghints - Decoder hintsnull otherwiseDecodeHintTypepublic static BitMatrix encodeBitMatrix(java.lang.String content,
BarcodeFormat format,
int width,
int height)
content - Text to be encodedformat - Result barcode formatwidth - Result image widthheight - Result image heightnull otherwiseBitMatrixpublic static BitMatrix encodeBitMatrix(java.lang.String content,
BarcodeFormat format,
int width,
int height,
java.util.Map<EncodeHintType,?> hints)
content - Text to be encodedformat - Result barcode formatwidth - Result image widthheight - Result image heighthints - Encoder hintsnull otherwiseEncodeHintType,
BitMatrixpublic static android.graphics.Bitmap encodeBitmap(java.lang.String content,
BarcodeFormat format,
int width,
int height)
content - Text to be encodedformat - Result barcode formatwidth - Result image widthheight - Result image heightnull otherwisepublic static android.graphics.Bitmap encodeBitmap(java.lang.String content,
BarcodeFormat format,
int width,
int height,
java.util.Map<EncodeHintType,?> hints)
content - Text to be encodedformat - Result barcode formatwidth - Result image widthheight - Result image heighthints - Encoder hintsnull otherwiseEncodeHintTypepublic static android.graphics.Bitmap createBitmap(BitMatrix matrix)
matrix - Bit matrixBitMatrix,
Bitmap