Issue 1288 another fix to flip PDF417 over

git-svn-id: https://zxing.googlecode.com/svn/trunk@2312 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2012-06-15 11:47:26 +00:00
parent 8edb1ca833
commit bc4f114985

View file

@ -145,11 +145,11 @@ public final class PDF417Writer implements Writer {
// Creates the bitmatrix with extra space for whitespace
BitMatrix output = new BitMatrix(input[0].length + 2 * whiteSpace, input.length + 2 * whiteSpace);
output.clear();
for (int y = 0; y < input.length; y++) {
for (int y = 0, yOutput = output.getHeight() - whiteSpace; y < input.length; y++, yOutput--) {
for (int x = 0; x < input[0].length; x++) {
// Zero is white in the bytematrix
if (input[y][x] == 1) {
output.set(x + whiteSpace, y + whiteSpace);
output.set(x + whiteSpace, yOutput);
}
}
}