Skip to content

Commit ee995f3

Browse files
authored
Merge pull request #15 from romilly/master
Updated package name, function name in README.rst cdoe example
2 parents 1a8c113 + b634826 commit ee995f3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Usage Example
6666
from displayio import Bitmap, Palette
6767
import adafruit_sdcard
6868
import storage
69-
from adafruit_bitmap_saver import save_bitmap
69+
from adafruit_bitmapsaver import save_pixels
7070
7171
print('Setting up SD card')
7272
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)

adafruit_bitmapsaver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def _write_pixels(output_file, pixel_source, palette):
7979
saving_bitmap = isinstance(pixel_source, Bitmap)
8080
width, height = _rotated_height_and_width(pixel_source)
8181
row_buffer = bytearray(_bytes_per_row(width))
82-
result_buffer = bytearray(2048)
8382
for y in range(height, 0, -1):
8483
buffer_index = 0
8584
if saving_bitmap:
@@ -91,6 +90,7 @@ def _write_pixels(output_file, pixel_source, palette):
9190
color >>= 8
9291
buffer_index += 1
9392
else:
93+
result_buffer = bytearray(2048)
9494
data = pixel_source.fill_row(y - 1, result_buffer)
9595
for i in range(width):
9696
pixel565 = (data[i * 2] << 8) + data[i * 2 + 1]

0 commit comments

Comments
 (0)