-
Notifications
You must be signed in to change notification settings - Fork 21
Add option for using bitmaptools.readinto for indexed bitmap loads #45
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
Conversation
It looks like a lot of pylint errors are coming up, even on the existing repository. I see a recent PR from @dherrada to add pylint checks, which may have highlighted these issues. I'm not sure if that should be combined in this PR or with a separate PR to clean those up. Let me know if you want me to issue a separate PR with the cleanups. |
@kmatch98 Thanks for pinging me on this. So some of this is expected, specifically the duplicate-code check (at the bottom of the pylint section). However, it seems like the tests directory is being linted which wasn't previously happening. I personally don't see any downside to linting the tests directory and I don't think it'll take too long to manually do, but I think it'd be worth seeing if there are any downsides I'm not considering. @tannewt thoughts? |
@kmatch98 Yeah, they should be linted. I'll take care of it and then you can just merge master into your branch. |
@dherrada thanks for fixing the pylint issues. This is all passing the checks now and it's ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this successfully with:
Adafruit CircuitPython 6.2.0-beta.4-27-gc0ec904c7 on 2021-03-19; Adafruit Feather RP2040 with rp2040
Using IconWidget
with on_disk
set to False
It appears to be working correctly to me and I do see increased speed in the loading time for the images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.5.7 from 3.5.6: > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#128 from adafruit/anecdata-patch-2 > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#126 from adafruit/anecdata-patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_LTR390 to 1.1.0 from 1.0.3: > Merge pull request adafruit/Adafruit_CircuitPython_LTR390#3 from CedarGroveStudios/main Updating https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font to 1.3.7 from 1.3.6: > Merge pull request adafruit/Adafruit_CircuitPython_Bitmap_Font#41 from jepler/use-bitmaptools-readinto Updating https://github.com/adafruit/Adafruit_CircuitPython_datetime to 1.1.2 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_datetime#7 from brentru/fix-failing-tests > Merge pull request adafruit/Adafruit_CircuitPython_datetime#6 from cognitivegears/master Updating https://github.com/adafruit/Adafruit_CircuitPython_ImageLoad to 0.14.0 from 0.13.3: > Merge pull request adafruit/Adafruit_CircuitPython_ImageLoad#45 from kmatch98/master > "Increase duplicate code check threshold " > Merge pull request adafruit/Adafruit_CircuitPython_ImageLoad#46 from adafruit/tests-linting Updating https://github.com/adafruit/Adafruit_CircuitPython_Logging to 1.2.8 from 1.2.7: > Merge pull request adafruit/Adafruit_CircuitPython_Logging#18 from dastels/master Updating https://github.com/adafruit/Adafruit_CircuitPython_Motor to 3.3.0 from 3.2.8: > Merge pull request adafruit/Adafruit_CircuitPython_Motor#54 from CedarGroveStudios/master
This adds an option to use the new
bitmaptools.readinto
function. I observed a 4x speedup when loading a 320x240 pixel bitmap.Since some graphics bitmap files are read in different row directions, this library update requires one addition to the
bitmaptools.readinto
function to addreverse_rows
, from this PR: adafruit/circuitpython#4428Also, see this comment from @jepler that mentions the row direction of BMP files: adafruit/circuitpython#4403 (comment)