|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.zxing.LuminanceSource
com.google.zxing.client.j2se.BufferedImageLuminanceSource
public final class BufferedImageLuminanceSource
This LuminanceSource implementation is meant for J2SE clients and our blackbox unit tests.
Constructor Summary | |
---|---|
BufferedImageLuminanceSource(java.awt.image.BufferedImage image)
|
|
BufferedImageLuminanceSource(java.awt.image.BufferedImage image,
int left,
int top,
int width,
int height)
|
Method Summary | |
---|---|
LuminanceSource |
crop(int left,
int top,
int width,
int height)
Returns a new object with cropped image data. |
byte[] |
getMatrix()
Fetches luminance data for the underlying bitmap. |
byte[] |
getRow(int y,
byte[] row)
Fetches one row of luminance data from the underlying platform's bitmap. |
boolean |
isCropSupported()
|
boolean |
isRotateSupported()
This is always true, since the image is a gray-scale image. |
LuminanceSource |
rotateCounterClockwise()
Returns a new object with rotated image data. |
Methods inherited from class com.google.zxing.LuminanceSource |
---|
getHeight, getWidth, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BufferedImageLuminanceSource(java.awt.image.BufferedImage image)
public BufferedImageLuminanceSource(java.awt.image.BufferedImage image, int left, int top, int width, int height)
Method Detail |
---|
public byte[] getRow(int y, byte[] row)
LuminanceSource
getRow
in class LuminanceSource
y
- The row to fetch, 0 <= y < getHeight().row
- An optional preallocated array. If null or too small, it will be ignored.
Always use the returned object, and ignore the .length of the array.
public byte[] getMatrix()
LuminanceSource
getMatrix
in class LuminanceSource
public boolean isCropSupported()
isCropSupported
in class LuminanceSource
public LuminanceSource crop(int left, int top, int width, int height)
LuminanceSource
crop
in class LuminanceSource
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()
isRotateSupported
in class LuminanceSource
public LuminanceSource rotateCounterClockwise()
LuminanceSource
rotateCounterClockwise
in class LuminanceSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |