"Unfix" previous fix -- account for odd ByteMatrix representation by flipping black...
authorsrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 19 Mar 2010 12:17:29 +0000 (12:17 +0000)
committersrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 19 Mar 2010 12:17:29 +0000 (12:17 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1246 59b500cc-1b3d-0410-9834-0bbf25fbcc57

javase/src/com/google/zxing/client/j2se/MatrixToImageWriter.java

index 4a65de1..3c82a56 100644 (file)
@@ -68,7 +68,7 @@ public final class MatrixToImageWriter {
     BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
     for (int x = 0; x < width; x++) {
       for (int y = 0; y < height; y++) {
-        image.setRGB(x, y, matrix.get(x, y) == 0 ? WHITE : BLACK);
+        image.setRGB(x, y, matrix.get(x, y) == 0 ? BLACK : WHITE);
       }
     }
     return image;