com.google.zxing.client.j2se
Class BufferedImageLuminanceSource

java.lang.Object
  extended by com.google.zxing.LuminanceSource
      extended by com.google.zxing.client.j2se.BufferedImageLuminanceSource

public final class BufferedImageLuminanceSource
extends com.google.zxing.LuminanceSource

This LuminanceSource implementation is meant for J2SE clients and our blackbox unit tests.

Author:
dswitkin@google.com (Daniel Switkin), Sean Owen, code@elektrowolle.de (Wolfgang Jung)

Constructor Summary
BufferedImageLuminanceSource(BufferedImage image)
           
BufferedImageLuminanceSource(BufferedImage image, int left, int top, int width, int height)
           
 
Method Summary
 com.google.zxing.LuminanceSource crop(int left, int top, int width, int height)
           
 byte[] getMatrix()
           
 byte[] getRow(int y, byte[] row)
           
 boolean isCropSupported()
           
 boolean isRotateSupported()
          This is always true, since the image is a gray-scale image.
 com.google.zxing.LuminanceSource rotateCounterClockwise()
           
 com.google.zxing.LuminanceSource rotateCounterClockwise45()
           
 
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

BufferedImageLuminanceSource

public BufferedImageLuminanceSource(BufferedImage image)

BufferedImageLuminanceSource

public BufferedImageLuminanceSource(BufferedImage image,
                                    int left,
                                    int top,
                                    int width,
                                    int height)
Method Detail

getRow

public byte[] getRow(int y,
                     byte[] row)
Specified by:
getRow in class com.google.zxing.LuminanceSource

getMatrix

public byte[] getMatrix()
Specified by:
getMatrix in class com.google.zxing.LuminanceSource

isCropSupported

public boolean isCropSupported()
Overrides:
isCropSupported in class com.google.zxing.LuminanceSource

crop

public com.google.zxing.LuminanceSource crop(int left,
                                             int top,
                                             int width,
                                             int height)
Overrides:
crop in class com.google.zxing.LuminanceSource

isRotateSupported

public boolean isRotateSupported()
This is always true, since the image is a gray-scale image.

Overrides:
isRotateSupported in class com.google.zxing.LuminanceSource
Returns:
true

rotateCounterClockwise

public com.google.zxing.LuminanceSource rotateCounterClockwise()
Overrides:
rotateCounterClockwise in class com.google.zxing.LuminanceSource

rotateCounterClockwise45

public com.google.zxing.LuminanceSource rotateCounterClockwise45()
Overrides:
rotateCounterClockwise45 in class com.google.zxing.LuminanceSource


Copyright © 2007-2012. All Rights Reserved.