File tree Expand file tree Collapse file tree
RGBMatrixEmulator/adapters/raw_adapter Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from RGBMatrixEmulator .adapters .base import BaseAdapter
2-
3- from PIL import Image
4-
5- import numpy as np
2+ from RGBMatrixEmulator .internal .pixel_style import PixelStyle
63
74
85class RawAdapter (BaseAdapter ):
6+ SUPPORTED_PIXEL_STYLES = [
7+ PixelStyle .SQUARE ,
8+ PixelStyle .CIRCLE ,
9+ PixelStyle .REAL ,
10+ ]
11+
912 MAX_FRAMES_STORED = 128
1013 DEFAULT_MAX_FRAME = - 1 # Never halts
1114
@@ -29,7 +32,7 @@ def load_emulator_window(self):
2932 pass
3033
3134 def _dump_screenshot (self , path ):
32- image = Image . fromarray ( np . array ( self ._last_frame (), dtype = "uint8" ), "RGB" )
35+ image = self . _get_masked_image ( self ._last_frame ())
3336 image .save (path )
3437
3538 def _last_frame (self ):
Original file line number Diff line number Diff line change 11{
22 "_comment" : " This config is used specifically to test RGBME via the raw adapter" ,
33 "pixel_outline" : 0 ,
4- "pixel_size" : 16 ,
4+ "pixel_size" : 1 ,
55 "pixel_style" : " square" ,
66 "pixel_glow" : 6 ,
77 "display_adapter" : " raw" ,
3131 "led_rgb_sequence" : " RGB"
3232 },
3333 "log_level" : " debug"
34- }
34+ }
You can’t perform that action at this time.
0 commit comments