Skip to content

Updated package name, function name in README.rst cdoe example #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Usage Example
from displayio import Bitmap, Palette
import adafruit_sdcard
import storage
from adafruit_bitmap_saver import save_bitmap
from adafruit_bitmapsaver import save_pixels

print('Setting up SD card')
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
Expand Down
2 changes: 1 addition & 1 deletion adafruit_bitmapsaver.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def _write_pixels(output_file, pixel_source, palette):
saving_bitmap = isinstance(pixel_source, Bitmap)
width, height = _rotated_height_and_width(pixel_source)
row_buffer = bytearray(_bytes_per_row(width))
result_buffer = bytearray(2048)
for y in range(height, 0, -1):
buffer_index = 0
if saving_bitmap:
Expand All @@ -91,6 +90,7 @@ def _write_pixels(output_file, pixel_source, palette):
color >>= 8
buffer_index += 1
else:
result_buffer = bytearray(2048)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result_buffer line at Line 82 could be removed as it is no longer needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @lesamouraipourpre. I removed that unused copy of the variable with latest commit

data = pixel_source.fill_row(y - 1, result_buffer)
for i in range(width):
pixel565 = (data[i * 2] << 8) + data[i * 2 + 1]
Expand Down