Moved CroppedMonochromeBitmapSource into the common package and fixed some more 100...
[zxing.git] / core / src / com / google / zxing / multi / ByQuadrantReader.java
index e874e86..be112d8 100644 (file)
@@ -20,7 +20,7 @@ import com.google.zxing.Reader;
 import com.google.zxing.Result;
 import com.google.zxing.MonochromeBitmapSource;
 import com.google.zxing.ReaderException;
-import com.google.zxing.CroppedMonochromeBitmapSource;
+import com.google.zxing.common.CroppedMonochromeBitmapSource;
 
 import java.util.Hashtable;
 
@@ -28,8 +28,8 @@ import java.util.Hashtable;
  * This class attempts to decode a barcode from an image, not by scanning the whole image,
  * but by scanning subsets of the image. This is important when there may be multiple barcodes in
  * an image, and detecting a barcode may find parts of multiple barcode and fail to decode
- * (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center 'quadrant'
- * to cover the case where a barcode is found in the center.
+ * (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center
+ * 'quadrant' to cover the case where a barcode is found in the center.
  *
  * @see GenericMultipleBarcodeReader
  */
@@ -52,28 +52,32 @@ public final class ByQuadrantReader implements Reader {
     int halfWidth = width / 2;
     int halfHeight = height / 2;
 
-    MonochromeBitmapSource topLeft = new CroppedMonochromeBitmapSource(image, 0, 0, halfWidth, halfHeight);
+    MonochromeBitmapSource topLeft = new CroppedMonochromeBitmapSource(image, 0, 0, halfWidth,
+        halfHeight);
     try {
       return delegate.decode(topLeft, hints);
     } catch (ReaderException re) {
       // continue
     }
 
-    MonochromeBitmapSource topRight = new CroppedMonochromeBitmapSource(image, halfWidth, 0, width, halfHeight);
+    MonochromeBitmapSource topRight = new CroppedMonochromeBitmapSource(image, halfWidth, 0, width,
+        halfHeight);
     try {
       return delegate.decode(topRight, hints);
     } catch (ReaderException re) {
       // continue
     }
 
-    MonochromeBitmapSource bottomLeft = new CroppedMonochromeBitmapSource(image, 0, halfHeight, halfWidth, height);
+    MonochromeBitmapSource bottomLeft = new CroppedMonochromeBitmapSource(image, 0, halfHeight,
+        halfWidth, height);
     try {
       return delegate.decode(bottomLeft, hints);
     } catch (ReaderException re) {
       // continue
     }
 
-    MonochromeBitmapSource bottomRight = new CroppedMonochromeBitmapSource(image, halfWidth, halfHeight, width, height);
+    MonochromeBitmapSource bottomRight = new CroppedMonochromeBitmapSource(image, halfWidth,
+        halfHeight, width, height);
     try {
       return delegate.decode(bottomRight, hints);
     } catch (ReaderException re) {