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 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
 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.
 LuminanceSource rotateCounterClockwise()
           
 LuminanceSource rotateCounterClockwise45()
           
 
Methods inherited from class com.google.zxing.LuminanceSource
getHeight, getWidth, invert, 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 LuminanceSource

getMatrix

public byte[] getMatrix()
Specified by:
getMatrix in class LuminanceSource

isCropSupported

public boolean isCropSupported()
Overrides:
isCropSupported in class LuminanceSource

crop

public LuminanceSource crop(int left,
                            int top,
                            int width,
                            int height)
Overrides:
crop in class LuminanceSource

isRotateSupported

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

Overrides:
isRotateSupported in class LuminanceSource
Returns:
true

rotateCounterClockwise

public LuminanceSource rotateCounterClockwise()
Overrides:
rotateCounterClockwise in class LuminanceSource

rotateCounterClockwise45

public LuminanceSource rotateCounterClockwise45()
Overrides:
rotateCounterClockwise45 in class LuminanceSource


Copyright © 2015. All rights reserved.