docs/apidocs/com/google/zxing/BinaryBitmap.html
Package com.google.zxing
java.lang.Object com.google.zxing.BinaryBitmap
public final class BinaryBitmapextends Object
Constructors
Constructor
Description
BinaryBitmap(Binarizer binarizer)
All MethodsInstance MethodsConcrete Methods
Modifier and Type
Method
Description
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.
String
toString()
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public BinaryBitmap(Binarizer binarizer)
public BitArray getBlackRow(int y, BitArray row) throws NotFoundException
y - The row to fetch, which must be in [0, 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.Returns:The array of bits for this row (true means black).Throws:NotFoundException - if row can't be binarizedpublic BitMatrix getBlackMatrix() throws NotFoundException
NotFoundException - if image can't be binarized to make a matrixpublic BinaryBitmap crop(int left, int top, int width, int height)
left - The left coordinate, which must be in [0,getWidth())top - The top coordinate, which must be in [0,getHeight())width - The width of the rectangle to crop.height - The height of the rectangle to crop.Returns:A cropped version of this object.public BinaryBitmap rotateCounterClockwise()
isRotateSupported() is true.
Returns:A rotated version of this object.public BinaryBitmap rotateCounterClockwise45()
isRotateSupported() is true.
Returns:A rotated version of this object.public String toString()
Overrides:toString in class Object