"Unfix" previous fix -- account for odd ByteMatrix representation by flipping black and white to make result correct

git-svn-id: https://zxing.googlecode.com/svn/trunk@1246 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2010-03-19 12:17:29 +00:00
parent 85a6da3052
commit ae635078cb

View file

@ -68,7 +68,7 @@ public final class MatrixToImageWriter {
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
for (int x = 0; x < width; x++) { for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) { 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; return image;