From 192622c54eeec86af8f6c6a7adef4a58a6cd4fcb Mon Sep 17 00:00:00 2001 From: Erik Corry Date: Thu, 29 Feb 2024 13:42:38 +0100 Subject: [PATCH] feedback --- tests/bitmap-2-visualized.toit | 6 ------ tests/png-visualizer.toit | 5 +---- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/bitmap-2-visualized.toit b/tests/bitmap-2-visualized.toit index 3e02f4a..71967c5 100644 --- a/tests/bitmap-2-visualized.toit +++ b/tests/bitmap-2-visualized.toit @@ -39,12 +39,6 @@ main args: heater-translucent := file.read-content "tests/third_party/pictogrammers/heater-translucent.png" heater-translucent-uncompressed := file.read-content "tests/third_party/pictogrammers/heater-translucent-uncompressed.png" - swap-red-and-black := :: | r/int g/int b/int a/int | - if r > 0x80: - #[0, 0, 0, a] - else: - #[0xff, 0, 0, a] - display.add (Png --x=16 --y=32 --png-file=heater) display.add (Png --x=100 --y=32 --png-file=heater-4-bit) display.add (Png --x=184 --y=32 --png-file=heater-2-bit) diff --git a/tests/png-visualizer.toit b/tests/png-visualizer.toit index b23205e..df08a5d 100644 --- a/tests/png-visualizer.toit +++ b/tests/png-visualizer.toit @@ -407,9 +407,6 @@ byte-swap_ ba/ByteArray -> ByteArray: class SwapRedAndBlack implements png.PaletteTransformer: transform palette/ByteArray -> none: - if palette[0] >= 0x80: - palette[0] = 0 - else: - palette[0] = 0xff + palette[0] = (palette[0] >= 0x80) ? 0 : 0xff palette[1] = 0 palette[2] = 0