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
 
81
 
82
         # TODO cropping and scaling not working for GIF animations
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
         self.xOff = int((self.gui.width - self.image.width) / 2)
86
         self.xOff = int((self.gui.width - self.image.width) / 2)
87
         self.yOff = int((self.gui.height - self.image.height) / 2)
87
         self.yOff = int((self.gui.height - self.image.height) / 2)
143
     t = util.getTarget(i)
143
     t = util.getTarget(i)
144
 
144
 
145
     from manager import Manager
145
     from manager import Manager
146
-    m = Manager(t, i)
146
+    m = Manager(t, i, 1)
147
 
147
 
148
     scriptDir = os.path.dirname(os.path.realpath(__file__))
148
     scriptDir = os.path.dirname(os.path.realpath(__file__))
149
     imageDir = os.path.join(scriptDir, "images")
149
     imageDir = os.path.join(scriptDir, "images")
154
             if not sys.argv[1] in filename:
154
             if not sys.argv[1] in filename:
155
                 continue
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
         if filename != "camp23.png":
162
         if filename != "camp23.png":
161
             continue
163
             continue

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


+ 3
- 0
livingroom.py View File

51
 m.add(ImageScreen(t, "32_earth.gif", 0.2, 2))
51
 m.add(ImageScreen(t, "32_earth.gif", 0.2, 2))
52
 m.add(Solid(t, pause))
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
 m.add(ImageScreen(t, "cann.png", 0.2, 1, 10.0))
57
 m.add(ImageScreen(t, "cann.png", 0.2, 1, 10.0))
55
 m.add(Solid(t, pause))
58
 m.add(Solid(t, pause))
56
 
59
 

Loading…
Cancel
Save