|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.zxing.BinaryBitmap
public final class BinaryBitmap
This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects accept a BinaryBitmap and attempt to decode it.
Constructor Summary | |
---|---|
BinaryBitmap(Binarizer binarizer)
|
Method Summary | |
---|---|
BinaryBitmap |
crop(int left,
int top,
int width,
int height)
Returns a new object with cropped image data. |
BitMatrix |
getBlackMatrix()
Converts a 2D array of luminance data to 1 bit. |
BitArray |
getBlackRow(int y,
BitArray row)
Converts one row of luminance data to 1 bit data. |
int |
getHeight()
|
int |
getWidth()
|
boolean |
isCropSupported()
|
boolean |
isRotateSupported()
|
BinaryBitmap |
rotateCounterClockwise()
Returns a new object with rotated image data by 90 degrees counterclockwise. |
BinaryBitmap |
rotateCounterClockwise45()
Returns a new object with rotated image data by 45 degrees counterclockwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryBitmap(Binarizer binarizer)
Method Detail |
---|
public int getWidth()
public int getHeight()
public BitArray getBlackRow(int y, BitArray row) throws NotFoundException
y
- The row to fetch, 0 <= y < bitmap height.row
- An optional preallocated array. If null or too small, it will be ignored.
If used, the Binarizer will call BitArray.clear(). Always use the returned object.
NotFoundException
public BitMatrix getBlackMatrix() throws NotFoundException
NotFoundException
public boolean isCropSupported()
public BinaryBitmap crop(int left, int top, int width, int height)
left
- The left coordinate, 0 <= left < getWidth().top
- The top coordinate, 0 <= top <= getHeight().width
- The width of the rectangle to crop.height
- The height of the rectangle to crop.
public boolean isRotateSupported()
public BinaryBitmap rotateCounterClockwise()
isRotateSupported()
is true.
public BinaryBitmap rotateCounterClockwise45()
isRotateSupported()
is true.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |