More fixes, to cropping BufferedImages
[zxing.git] / javase / src / com / google / zxing / client / j2se / BufferedImageLuminanceSource.java
index d9e61a3..e60d3e2 100644 (file)
@@ -110,7 +110,7 @@ public final class BufferedImageLuminanceSource extends LuminanceSource {
 
   @Override
   public LuminanceSource crop(int left, int top, int width, int height) {
-    return new BufferedImageLuminanceSource(image, left, top, width, height);
+    return new BufferedImageLuminanceSource(image, this.left + left, this.top + top, width, height);
   }
 
   // Can't run AffineTransforms on images of unknown format.