Browse Source

pre-created images with less whitespace

Thomas Buck 9 months ago
parent
commit
fe8698be04
5 changed files with 1498 additions and 1498 deletions
  1. 3
    3
      image.py
  2. 816
    816
      img_tmp.py
  3. 3
    3
      qr.py
  4. 675
    675
      qr_tmp.py
  5. 1
    1
      test.py

+ 3
- 3
image.py View File

@@ -152,11 +152,11 @@ if __name__ == "__main__":
152 152
                 f.write("# size:" + str(d.image.width) + "x" + str(d.image.height) + os.linesep)
153 153
                 f.write("img_data = [" + os.linesep)
154 154
                 for y in range(0, d.image.height):
155
-                    f.write("    [" + os.linesep)
155
+                    f.write(" [" + os.linesep)
156 156
                     for x in range(0, d.image.width):
157 157
                         s = str(d.image.getpixel((x, y)))
158
-                        f.write("        " + s + "," + os.linesep)
159
-                    f.write("    ]," + os.linesep)
158
+                        f.write("  " + s + "," + os.linesep)
159
+                    f.write(" ]," + os.linesep)
160 160
                 f.write("]" + os.linesep)
161 161
             print()
162 162
         except Exception as e:

+ 816
- 816
img_tmp.py
File diff suppressed because it is too large
View File


+ 3
- 3
qr.py View File

@@ -125,11 +125,11 @@ if __name__ == "__main__":
125 125
             f.write("# size:" + str(d.image.width) + "x" + str(d.image.height) + os.linesep)
126 126
             f.write("qr_data = [" + os.linesep)
127 127
             for y in range(0, d.image.height):
128
-                f.write("    [" + os.linesep)
128
+                f.write(" [" + os.linesep)
129 129
                 for x in range(0, d.image.width):
130 130
                     s = str(d.image.getpixel((x, y)))
131
-                    f.write("        " + s + "," + os.linesep)
132
-                f.write("    ]," + os.linesep)
131
+                    f.write("  " + s + "," + os.linesep)
132
+                f.write(" ]," + os.linesep)
133 133
             f.write("]" + os.linesep)
134 134
     except Exception as e:
135 135
         print()

+ 675
- 675
qr_tmp.py
File diff suppressed because it is too large
View File


+ 1
- 1
test.py View File

@@ -13,7 +13,7 @@
13 13
 import pygame
14 14
 
15 15
 class TestGUI:
16
-    def __init__(self, width = 32 * 2, height = 32, multiplier = 16):
16
+    def __init__(self, width = 32 * 1, height = 32, multiplier = 16):
17 17
         self.width = width
18 18
         self.height = height
19 19
         self.multiplier = multiplier

Loading…
Cancel
Save