mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 19:57:27 -08:00
"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:
parent
85a6da3052
commit
ae635078cb
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue