diff --git a/RGBMatrixEmulator/adapters/raw_adapter/__init__.py b/RGBMatrixEmulator/adapters/raw_adapter/__init__.py index 1e00893..89b2d07 100644 --- a/RGBMatrixEmulator/adapters/raw_adapter/__init__.py +++ b/RGBMatrixEmulator/adapters/raw_adapter/__init__.py @@ -1,11 +1,14 @@ from RGBMatrixEmulator.adapters.base import BaseAdapter - -from PIL import Image - -import numpy as np +from RGBMatrixEmulator.internal.pixel_style import PixelStyle class RawAdapter(BaseAdapter): + SUPPORTED_PIXEL_STYLES = [ + PixelStyle.SQUARE, + PixelStyle.CIRCLE, + PixelStyle.REAL, + ] + MAX_FRAMES_STORED = 128 DEFAULT_MAX_FRAME = -1 # Never halts @@ -29,7 +32,7 @@ def load_emulator_window(self): pass def _dump_screenshot(self, path): - image = Image.fromarray(np.array(self._last_frame(), dtype="uint8"), "RGB") + image = self._get_masked_image(self._last_frame()) image.save(path) def _last_frame(self): diff --git a/test/test_config.json b/test/test_config.json index 62186a3..c91c086 100644 --- a/test/test_config.json +++ b/test/test_config.json @@ -1,7 +1,7 @@ { "_comment": "This config is used specifically to test RGBME via the raw adapter", "pixel_outline": 0, - "pixel_size": 16, + "pixel_size": 1, "pixel_style": "square", "pixel_glow": 6, "display_adapter": "raw", @@ -31,4 +31,4 @@ "led_rgb_sequence": "RGB" }, "log_level": "debug" -} \ No newline at end of file +}