8000 tests: move bitmaptools files to their own directory · kattni/circuitpython@ddf2477 · GitHub
[go: up one dir, main page]

Skip to content

Commit ddf2477

Browse files
committed
tests: move bitmaptools files to their own directory
1 parent 30c07a7 commit ddf2477

File tree

9 files changed

+18
-31
lines changed

9 files changed

+18
-31
lines changed
Binary file not shown.
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import bitmaptools
2+
import displayio
3+
import _bmp16
4+
5+
if "/" in __file__:
6+
here = __file__.rsplit("/", 1)[0]
7+
else:
8+
here = "."
9+
10+
c = displayio.Colorspace.BGR565
11+
12+
b1 = _bmp16.loadbmp16(here + "/minerva16.bmp")
13+
b3 = displayio.Bitmap(320, 240, 65536)
14+
15+
bitmaptools.dither(b3, b1, c)
16+
_bmp16.writebmp16(f"dither-atkinson.bmp", b3)
17+
bitmaptools.dither(b3, b1, c, bitmaptools.DitherAlgorithm.FloydStenberg)
18+
_bmp16.writebmp16(f"dither-floydstenberg.bmp", b3)
Binary file not shown.

tests/circuitpython-manual/dither.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0