Added rendering fix from beyonddeath
[zxing.git] / csharp / qrcode / QRCodeWriter.cs
index 9b684cf..8807537 100755 (executable)
@@ -126,10 +126,17 @@ namespace com.google.zxing.qrcode
 \r
             // 3. Write the white lines at the bottom\r
             int offset2 = topPadding + (inputHeight * multiple);\r
-            for (int y = offset2; y < outputHeight; y++)\r
-            {\r
+            for (int y = offset2; y < outputHeight; y++) {\r
               setRowColor(outputArray[y], unchecked((sbyte) 255));\r
             }\r
+\r
+            // Added per beyonddeath\r
+            for (int x = 0; x < outputHeight; x++) {\r
+              for (int y = 0; y < outputWidth; y++) {\r
+                output.set(y, x, outputArray[x][y]);\r
+              }\r
+            }\r
+\r
             return output;\r
           }\r
 \r
@@ -140,4 +147,4 @@ namespace com.google.zxing.qrcode
           }\r
     \r
     }\r
-}
\ No newline at end of file
+}\r