Browse Source

image test runner shows both bilinear and nearest neighbour. add aphex twin logo.

Thomas Buck 1 year ago
parent
commit
db0ea2dbea
3 changed files with 9 additions and 4 deletions
  1. 6
    4
      image.py
  2. BIN
      images/aphex-twin-logo.png
  3. 3
    0
      livingroom.py

+ 6
- 4
image.py View File

@@ -81,7 +81,7 @@ class ImageScreen:
81 81
 
82 82
         # TODO cropping and scaling not working for GIF animations
83 83
 
84
-        print(p, self.image.width, self.image.height, self.image.is_animated, self.image.n_frames)
84
+        print(p, self.image.width, self.image.height, self.image.is_animated, self.image.n_frames, nearest)
85 85
 
86 86
         self.xOff = int((self.gui.width - self.image.width) / 2)
87 87
         self.yOff = int((self.gui.height - self.image.height) / 2)
@@ -143,7 +143,7 @@ if __name__ == "__main__":
143 143
     t = util.getTarget(i)
144 144
 
145 145
     from manager import Manager
146
-    m = Manager(t, i)
146
+    m = Manager(t, i, 1)
147 147
 
148 148
     scriptDir = os.path.dirname(os.path.realpath(__file__))
149 149
     imageDir = os.path.join(scriptDir, "images")
@@ -154,8 +154,10 @@ if __name__ == "__main__":
154 154
             if not sys.argv[1] in filename:
155 155
                 continue
156 156
 
157
-        d = ImageScreen(t, filename)
158
-        m.add(d)
157
+        for i in range(0, 2):
158
+            nearest = (i == 1)
159
+            d = ImageScreen(t, filename, 0.2, 1, 2.5, None, None, nearest)
160
+            m.add(d)
159 161
 
160 162
         if filename != "camp23.png":
161 163
             continue

BIN
images/aphex-twin-logo.png View File


+ 3
- 0
livingroom.py View File

@@ -51,6 +51,9 @@ m.add(Solid(t, pause))
51 51
 m.add(ImageScreen(t, "32_earth.gif", 0.2, 2))
52 52
 m.add(Solid(t, pause))
53 53
 
54
+m.add(ImageScreen(t, "aphex-twin-logo.png", 0.2, 1, 10.0, None, None, False))
55
+m.add(Solid(t, pause))
56
+
54 57
 m.add(ImageScreen(t, "cann.png", 0.2, 1, 10.0))
55 58
 m.add(Solid(t, pause))
56 59
 

Loading…
Cancel
Save